我有一个名为mandacalc的大型脚本,我想始终使用nohup命令运行它。如果我从命令行调用它:
nohup mandacalc &
一切都运行得很快。但是,如果我尝试在我的命令中包含nohup,这样我就不需要在每次执行它时都输入它,我会收到一条错误消息。
到目前为止,我尝试了这些选项:
nohup (
command1
....
commandn
exit 0
)
并且:
nohup bash -c "
command1
....
commandn
exit 0
" # and also with single quotes.
到目前为止,我只收到抱怨nohup命令的实施或脚本中使用的其他引号的错误消息。
干杯。