#!/bin/bash export proc=$1 pgrep $proc > /dev/null if [ $? -ne "0" ] then exit 1 else exit 0 fi