Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Feb 062010

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]

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>