在另一个脚本中执行一个脚本

Pol*_*len 1 linux bash

我有一个这样的脚本:

/root/bin/script1.sh
Run Code Online (Sandbox Code Playgroud)

将此行放在 .bashrc 中

/root/bin/script1.sh &
Run Code Online (Sandbox Code Playgroud)

script1.sh不运行 - 问题是 &。没有“&”脚本运行完美

wat*_*sky 5

测试命令:

/root/bin/script1.sh & disown
Run Code Online (Sandbox Code Playgroud)

(.bashrc 中的这一行)