In Unix shells, wait is a command which pauses until execution of a background process has ended.
If n is not given, the command waits until all jobs known to the invoking shell have terminated.
wait normally returns the exit status of the last job which terminated.
The following example will fetch the src/ directory from a machine named iona using rsync and simultaneously update the libraries on which this program depends, before building the combination.
Wait for specified job control id number: