我想编写一个 bash 脚本来打开多个 screen 并将它们分离。所以最后你会打开几个 screen ,每个 screen 运行不同的命令。
类似于ssh
:
ssh DESTINATION "command 1; command 2;"
我的想法是这样写:
screen -S name1 "command1"
screen -S name2 "command2"
...
但这行不通。
想法?
最佳答案
将 -d -m
添加到 screen
命令。
关于带 screen 的 bash 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3961108/