【问题标题】:Linux shell scripting for different tabs不同选项卡的 Linux shell 脚本
【发布时间】:2017-03-02 04:27:27
【问题描述】:

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

【问题讨论】:

  • 您可以使用screen + ssh 为每个连接创建一个循环
  • 你的意思是什么标签?例如见man gnome-terminal
  • tmuxscreen 的一个不错的替代品。

标签: linux shell scripting command


【解决方案1】:

你可以试试这样的;

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-07-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多