The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 02-28-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Ok, third time's a charm...

What about:
Code:
#!/bin/ksh
NUM=`ps -ef | grep "[p]rocess.sh" | wc -l
if [ $NUM -gt 1 ] 
then 
            echo "The script is running" 
            exit 0 
fi
added code tags for readability --oombera

Last edited by oombera; 02-19-2004 at 02:40 PM..