O'Reilly logo

Mac OS X Tiger in a Nutshell by Jason McIntosh, Chuck Toporek, Chris Stone, Andy Lester

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

wait

Synopsis

                     
                        wait
                      [ID]

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."

Example

    wait $!      Wait for last background process to finish

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required