Waiting on background tasks
Francisco Borges
f.borges at rug.nl
Tue Apr 11 10:22:42 UTC 2006
» On Mon, Apr 10, 2006 at 04:14AM -0500, Kenneth P. Turvey wrote:
> On Mon, 10 Apr 2006 17:32:47 +1000, Erik Christiansen wrote:
>
> > The bash shell has a built-in "wait [n]". From man bash: "If n is not
> > given, all currently active child processes are waited for, and the return
> > status is zero."
>
> Thanks to all those that responded. This will be a big help. Out of
> curiosity, Erik, does this translate to other shells as well or is it just
> a bash thing?
1. this also works on zsh (zsh rocks!!) and tcsh, though I think on tcsh
you may not use job numbers. I would expect ksh to have it also.
2. in bash, wait also seems to solve some outputing issues inside
scripts: http://www.tldp.org/LDP/abs/html/x6659.html
BTW, ``Advanced Bash-Scripting Guide - An in-depth exploration of the
art of shell scripting'', is a great and up to date book on bash
http://www.tldp.org/LDP/abs/html/index.html
--
Francisco
More information about the ubuntu-users
mailing list