Last active
August 29, 2015 14:18
-
-
Save bse666/533da2c0b288e5a1f958 to your computer and use it in GitHub Desktop.
check-process-running
This file contains 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
# by: http://stackoverflow.com/questions/2903354/bash-script-to-check-running-process | |
pgrep procname && echo Running | |
pgrep procname || echo Not running | |
killall -q -0 procname && echo Running | |
pidof procname && echo Running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment