On 2009-08-14 at 21:15 -0400, Brandon S. Allbery KF8NH wrote: > There is, it's unsurprisingly called "wait". If you want to wait only > for some, you can save pids of backgrounded commands (they go into $!) > and wait on a list of pids; by default it waits on all backgrounded > jobs.
Beware that while the Single Unix Specification says that wait(1) can take a list of pids, and both bash and zsh support this, FreeBSD sh does not accept more than one pid; or rather, it does, but the later pids are ignored. dash documents accepting only one pid but I just tested it and it waited for them all. Using wait without parameters to wait for all jobs is portable. AFAIK. Regards, -Phil _______________________________________________ Discuss mailing list [email protected] http://lopsa.org/cgi-bin/mailman/listinfo/discuss This list provided by the League of Professional System Administrators http://lopsa.org/
