Last Updated: February 25, 2016
·
560
· killme2008

Check if process is alive in shell

#!/bin/sh
if [ -z "$(ps aux|grep ruby |grep -v grep)" ];  then
      echo "ruby process is dead"
fi