Don't mess with grepping, or even running ps. Get the pid, and kill 0, $pid; it to see if it's alive. If you must run ps, don't grep, but call it like ps h 1234 where 1234 is the pid wanted, and see if it outputs anything or even its exit status.
In reply to Re: How best to see if syslogd is running?
by ambrus
in thread How best to see if syslogd is running?
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |