2

Is it possible in Bash to call a shell script from another shell script but not have the original script wait for the sub-script to complete?

2 Answers2

7

Just fork it with a &. As in, sh /path/to/script/script.sh &

This will print messages from the subscript, but you can replace the & with >/dev/null & and suppress the output.

Nathan C
  • 15,223
1

You should use "nohup" to make sure the process / script completes even if your user is logged out:

nohup /my/script.sh &
Pascal Schmiel
  • 1,798
  • 12
  • 18