bash: script doesn't run in the background
I have a scrip开发者_运维百科t that performs several linux commands. When I run "./script.sh &" it works fine until I cancel the console. However, when I login again the scritp seems to be running in background but not doing anything.
What can be the problem?
Thanks
You forgot to use nohup
when starting it.
nohup {command} 0 2>/dev/null &
should work for you
精彩评论