Hi
I have a shell script A which calls another 10 shell scripts which run in background. How do i make the parent script wait for the child scripts complete, or in other words, i must be able to do a grep of parent script to find out if the child scripts are still running.
My Code:
nohup a.sh > /dev/null 2>&1
Code in a.sh:
nohup b.sh > /opt/portal/6.5/apps/b.txt &
nohup c.sh > /opt/portal/6.5/apps/c.txt &
nohup d.sh > /opt/portal/6.5/apps/d.txt &
nohup e.sh > /opt/portal/6.5/apps/e.txt &
nohup f.sh > /opt/portal/6.5/apps/f.txt &
nohup g.sh > /opt/portal/6.5/apps/g.txt &
i try to grep:
ps -ef|grep a.sh|grep -v grep
I must be able to do this successfully...
Kindly help..
Regards,
Albert