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
Written by dennis zhuang
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#