Wait for a process to exit to run a command
# Wait for firefox to be closed while [ `pidof firefox` ] do wait `pidof firefox` done # do something after ff exited