in reply to Re: Test for daemon
in thread Test for daemon
Please, let us not cargo-cult this crazy "grep -v grep" some more. I cringe each time I see that. It's a poor solution to a common problem.ps -ef | grep -v grep | grep inetd
The way to avoid picking out the grep process itself is to ask ps for the proper things:
If your ps doesn't have a "command-name only" solution, then simply muddy the argument so that the grep cannot match it:ps axc | grep inetd
Let's not be wasting processes needlessly. Think before you type, people.ps ax | grep '[i]netd'
-- Randal L. Schwartz, Perl hacker
|
|---|