Wait for other process to finish
1 2 # There's another process you want to wait on. In this example, 3 # you know the pid, and it's contained in the file $PID_FILE. 4 while ps -p `cat $PID_FILE` > /dev/null; do sleep 1; done 5 6 # Now you can continue knowing that process has finished...