Skip to content

Instantly share code, notes, and snippets.

@goddoe
Created May 16, 2023 14:58
Show Gist options
  • Save goddoe/8cf85ede81661a323a87bf83fc199bde to your computer and use it in GitHub Desktop.
Save goddoe/8cf85ede81661a323a87bf83fc199bde to your computer and use it in GitHub Desktop.
run after specific process done.
#!/usr/bin/env bash
PID=<SOME_PID>
while true; do
if ! ps -p PID> > /dev/null; then
./run.sh
break
fi
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment