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