在屏幕中运行命令的 Bash 脚本

JJJ*_*jim 0 mac terminal bash-scripting

我需要创建一个 bash 脚本来打开一个新的屏幕会话,然后在该会话中运行一个程序。有可能这样做吗?任何帮助表示赞赏。

use*_*686 5

screen -dmS sessionname mycommand
Run Code Online (Sandbox Code Playgroud)

顺便说一下,其中列出了screen --help.