On 2009 Mar 27, at 05:01, Eric F Crist wrote: > Sometimes, you need to add a few w's to the command to parse it > properly: Yes, it took me about 5 years of using bash to learn why ps didn't always work. Anyhow, thanks Christoph. I was hoping there might be something that would identify an app from Launch Services database, but then I figured that since I'm mainly concerned with false alarms and can tolerate misses, I could use ps and grep... # Assume that $appName is both the package name and the executable # name of the desired app. Warning: Either or both of these # assumptions can be wrong. appsRunning=`ps -alxww | grep -c "$appName.app/Contents/MacOS/$appName"` # If $appName is running, results count will be 2, the second # one being the grep process itself. Subtract that one. let "appsRunning -= 1" if (($appsRunning > 0)) then echo "$appName is running" else echo "$appName is not running" fi