Greetings! I have a script that is run by cron every hour. I want to create a conditional statement that will check to see if the script is already running and to exit if the script is found in the output of 'ps x'. The conditional statement I'm working on is: test $(ps x | grep "/bin/bash /root/scripts/setiathome") || exit 1 When I run the following grep command, I get two matches: server:~ # ps x | grep "/bin/bash /root/scripts/setiathome" 9436 pts/0 S 0:00 /bin/bash /root/scripts/setiathome 9445 pts/0 S 0:00 grep /bin/bash /root/scripts/setiathome The first match (process 9436) is what I'm testing for. If the first match is not running, grep exits with a zero since the second match is found. How do I eliminate the second match? Thanks! Christopher Reimer