我在Ubuntu上使用bash.我想有一个shell脚本打开一个程序并继续执行shell脚本的下一行,即使该程序尚未终止.
添加&到命令会将其置于后台.
例:
/path/to/foo
/path/to/bar # not executed untill foo is done
/path/to/foo & # in background
/path/to/bar & # executes as soon as foo is started
Run Code Online (Sandbox Code Playgroud)