Pause in execution until all background jobs complete
(exit status 0 will be returned),
or pause until the specified background
ID or job
ID completes (exit status of
is returned). Note that the shell variable $! contains the process ID
of the most recent background process. If job control is not in effect,
ID can be only a process ID number.
See "Job Control."
wait $! Wait for last background process to finish.