February 2001
Beginner to intermediate
448 pages
9h 2m
English
Official Description
Awaits process completion.
Syntax
wait [pid]
Options
None
Oddities
The C shell has its own version of this command.
Example
$ sleep 15& # Start a job in the background [1] 1309 $ wait # Wait for it to complete [1] + Done sleep 15& $ $ sleep 15& # Start two jobs in the background [1] 1310 $ sleep 30& [2] 1311 $ jobs [2] + Running sleep 30& [1] - Running sleep 15& $ $ wait 1311 # Wait for a particular one to complete [1] + Done sleep 15& $
Read now
Unlock full access