Skip to content

Instantly share code, notes, and snippets.

@gismo141
Created November 5, 2014 10:13
Show Gist options
  • Save gismo141/2afad39b6af6f88c5246 to your computer and use it in GitHub Desktop.
Save gismo141/2afad39b6af6f88c5246 to your computer and use it in GitHub Desktop.
Wait for something to finish, then start something else right after it.
pid=$(ps -opid= -C your_script_name)
while [ -d /proc/$pid ] ; do
sleep 1
done && ./your_other_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment