wait's Examples

It waits for a process to complete and returns the exit status.

wait $!