continuing from Shell script: Ensure that script isn't executed if already running and with apologies: In the last solution, is "ps" enough or should it be "ps -ef" to show all running processes?
Sorry I don't have enough privilege to add a Comment to the previous Question.
ps, and care only about other instances run by the same user,psalone is adequate. If you care about instances run by other users, yes, you'll want to add some arguments. In any event, though, if you actually need your script to behave reliably and correctly, don't rely onpsat all -- useflock.