rohit264 rohit264 - 1 year ago 88
Bash Question

Linux shell scripting for different tabs

I want a script,which after executing will open multiple tabs and a specified command will run on every tab.Basically that command is ssh i.e. for connecting to other machines.

Answer Source

you can try something like this;

gnome-terminal --tab  --title "server1" -x bash -c "ssh -t user1@host1 'nohup yourCommand'" --tab  --title "server2" -x bash -c "ssh -t user2@host2 'nohup yourCommand'"
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download