I wrote two shell scripts a.sh and b.sh. In a.sh and b.sh I have a infinite for loop and they print some output to the te
a.sh
b.sh
These examples work fine:
nohup sh prog.sh proglog.log 2>&1 &
For loop you can use like this :
for i in {1..10}; do sh prog.sh; sleep 1; done prog.log 2>&1 &
It works in background and does not show any output.
nohup sh -x runShellScripts.sh &