Created
February 11, 2019 13:01
-
-
Save stoyanovgeorge/36724823ac0a44862dd48110aa272c58 to your computer and use it in GitHub Desktop.
Check if a PID (process ID is running and return True in case it does.
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
#!/bin/bash | |
if [[ $(ps -o pid= -p 2310) -ne 0 ]]; then | |
echo "True" | |
else | |
echo "False" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment