Thursday, May 17, 2012

Check if a process is running in Linux

Here is a bash script that simply check if a process is running or not.

#!/bin/bashif [ "$(pidof process_name)" ] then  echo "process is running"else  echo "process is not running"fi

No comments:

Post a Comment