Linux shell 不同选项卡的脚本

Linux shell scripting for different tabs

我想要一个脚本,该脚本在执行后将打开多个选项卡,并且指定的命令将在每个 tab.Basically 上 运行 该命令是 ssh,即用于连接到其他机器。

你可以尝试这样的事情;

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'"