Check if Mac process is running using Bash by process name

Viewed 53311

How do you check if a process on Mac OS X is running using the process's name in a Bash script?

I am trying to write a Bash script that will restart a process if it has stopped but do nothing if it is still running.

10 Answers
Related