Created
March 16, 2011 05:13
-
-
Save odiak/872049 to your computer and use it in GitHub Desktop.
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
exist_pid(){ | |
res=`ps ax | sed "s/^\s\+\?\([0-9]\+\).\+$/\1/g" | grep "^${1}$" | wc -l` | |
if test $res -ge 1 | |
then | |
return true | |
else | |
return false | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment