Skip to content

Instantly share code, notes, and snippets.

@odiak
Created March 16, 2011 05:13
Show Gist options
  • Save odiak/872049 to your computer and use it in GitHub Desktop.
Save odiak/872049 to your computer and use it in GitHub Desktop.
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