Wait for a process terminated
wait command allow you to monitor the termination of a process and quit afterward.
It is very useful when you want to trigger some action when a particular process terminated.
E.g. Send an email when a long running process of PID 5870 terminated
# wait 5870 && echo Finished | mail -s Task [email protected]