Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running sub-scripts

Status
Not open for further replies.

bhowani

Technical User
Sep 18, 2002
3
ZA
Hi

I have a scriptA that runs a series of other scripts. The other scripts are generated, so I don't know how many there are or how long they may run for. ScriptA goes through a for loop submitting each script in the background (&), so that scripts may run simultaneously. The problem is I don't know when the other scripts have ended.

Even though scriptA may be done, the other scripts may still be running in the background. Any ideas on how I may find out when the entire process is completed?

Thanks
Shanil Bhowani
 
save [$!] all all the background jobid-s [or pid-s] as there're spawned and 'wait' on all of them OUTSIDE the loop.

man ksh
man wait vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
Hi vgersh99

Thanks for your help - really appreciate it!

Regards
Shanil Bhowani
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top