我尝试使用以下方法执行我的脚本:
nohup . test.sh
Run Code Online (Sandbox Code Playgroud)
和
nohup . ./test.sh
Run Code Online (Sandbox Code Playgroud)
但是,我得到了:nohup: failed to run command `.': Permission denied
每次。
我真正想做的是在我的脚本中能够调用我使用别名的命令,但它只适用于“ . test.sh
”或“ . ./test.sh
”,而不是“ ./test.sh
”或“ sh ./test.sh
”,因为我得到“找不到命令”。但我希望能够用“nohup”运行它。