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.
if ps -ef | grep "_script1_" | grep -v grep >/dev/null
process part 2