wait
Format:
wait process ID
This means wait until process ID has finished before carrying on, or wait until all background processes have finished before carrying on.
To wait until process ID has finished before carrying on with the script or task:
$ wait 1299
Wait until all background processes have finished:
$ wait
Get Linux and Unix Shell Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.