On Fri, Oct 17, 2003 at 12:00:33AM +0200, Carlos E. R. wrote:
The 03.09.18 at 10:28, Dave Smith wrote:
(in other words, I am need to spawn script B from script A in separate process).
Adding an ampersand (&) at the end of a command launches it as another process. You should probably use 'sudo' to give it root privileges.
However, the parent script doesn't exit till the child exits.
Wrong. Here is an example. File a.sh: #!/bin/bash echo running sleep in background... sleep 10 & Now run a.sh: kastus@kastus:~> date ; ./a.sh ; date Thu Oct 16 17:52:36 PDT 2003 running sleep in background... Thu Oct 16 17:52:36 PDT 2003 kastus@kastus:~> date Thu Oct 16 17:52:38 PDT 2003 kastus@kastus:~> So parent script does not wait for the child to exit. Regards, -Kastus