带 screen 的 bash 脚本

标签 bash gnu-screen

我想编写一个 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/

相关文章:

bash shell 嵌套 for 循环

macos - 为什么 $PATH 在 shell 登录后会被覆盖?

bash - 如何附加 screen session 或创建它?

linux - 如何让 GNU screen 读取 .bash_profile/.bash_rc 更改?

linux - 如何在不将其通过管道传输到自身的情况下第二次制作 sed 编辑流?

bash - awk命令合并同一个文件的内容

linux - 如何将当前时间的目录作为 SLURM 日志路径的一部分

linux - 脚本完成后退出 screen

linux - 如何关闭 Raspberry Pi 上的 USB screen session ?

gnu-screen - 有没有办法在 Gnu Screen 中动态更新窗口名称?