Skip to content

Instantly share code, notes, and snippets.

@blha303
Created October 12, 2015 10:09
Show Gist options
  • Save blha303/895abf9acde5e06303d6 to your computer and use it in GitHub Desktop.
Save blha303/895abf9acde5e06303d6 to your computer and use it in GitHub Desktop.
Script that waits for the specified process to start before returning
#!/bin/bash
until ps aux | grep -v grep | grep -v "waitfor" | grep "$1" > /dev/null
do
sleep 0.1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment