Skip to content

Instantly share code, notes, and snippets.

@armando-couto
Last active April 10, 2023 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armando-couto/1b6a2e60aae2943a67c140d47378ec7b to your computer and use it in GitHub Desktop.
Save armando-couto/1b6a2e60aae2943a67c140d47378ec7b to your computer and use it in GitHub Desktop.
$ checkRunningProcess.sh proxy.py
#!/bin/bash
ps_out=`ps -ef | grep $1 | grep -v 'grep' | grep -v $0`
result=$(echo $ps_out | grep "$1")
if [[ "$result" != "" ]];then
echo "Running"
else
echo "Not Running"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment