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!

How to wait for multiple back ground jobs to complete 2

Status
Not open for further replies.

ddiamond

Programmer
Apr 22, 2005
918
US
In ksh, how would I write a script that launches many jobs in parallel, and then waits for them all to complete before performing the rest of its logic?
 
Code:
cmd1 &
cmd2 &
cmd3 &
wait
# all background jobs are finished now

HTH,

p5wizard
 
I'm impressed. I didn't know Unix made that so easy. I do most of my programming in windows. To do the same in windows is much more difficult.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top