how to properly use - ps -ef ???

January 18, 2006 at 09:14:20
Specs: Solaris, 2GH
Please help...

I found the following command at ask.com and it seems useful to find whether a script is currently executing.

However, I have no clue how to use it properly (I've tried). I want to use the command to find the string of the script name that I am looking for, if the string is found then that means it is running and I want to EXIT, otherwise, continue with the next step.

Please shed some light of how to properly use the below command for the above situation.

Thanks much...


if ps -ef | grep "_script1_" | grep -v grep >/dev/null
then
exit
else
process part 2
if

ihsail


See More: how to properly use - ps -ef ???

Report •


#1
January 18, 2006 at 13:10:26
does
ps -ef | grep "_script1_" | grep -v grep

display the script?


Report •
Related Solutions


Ask Question