How to write Bash script to open a terminal with two tabs, and execute commands in both tabs?
for instance:
tab 1 opens skype
tab 2 opens chromium-browser
In the end, I want one more thing: write a bash script with my skype username and password and feed those to skype.
Thanks
Best Answer
one terminal with two tabs:
use the -e switch to execute commands (or scripts):
(I don't think there is an easy way of feeding your credentials to skype via the terminal.)
Update: check w4YGcbTeIH's answer, skype allows giving credentials via the command line.
But beware, your credentials would be exposed and this should be avoided.
A script to open skype and chromium-browser would look like the following:
Put this code into
myscript.sh
and executechmod +x myscript.sh
(in a terminal) to make it executable.About skype:
skype &
) and it will load your default user profile~/.Skype
.--dbpath=<path>
where<path>
is your actual path of the Skype profile you want skype to load.To run the script do one of the following:
./myscript.sh