Created
July 10, 2017 09:29
-
-
Save munky69rock/154e7b9945e9a40c68e520c0682f8c09 to your computer and use it in GitHub Desktop.
Simple Process Watcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -ue | |
| keyword="$1" | |
| time=${2:-60} | |
| while test -n "$(ps aufx | grep $keyword | grep -v grep | grep -v $0)"; do | |
| sleep $time | |
| done | |
| echo done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment