On Wed, Oct 11, 2000 at 04:38:31PM -0700 or so it is rumoured hereabouts, 
Bruce J.A. Nourish thought:
> > if ps -U $LOGNAME | grep realmutt > /dev/null 
> 
> Be careful about using grep to search the output of ps. For example
> 
> $ ps ax | grep lemming
> 16004 tty1     S      0:00 grep lemming
> 
> Y'see? Grep makes a match on its own process.
> 

I generally use

ps | grep <PROCESS> | grep -v grep

That wil catch the process I require and dump the 'grep <PROCESS>' line

-- 
Conor Daly <[EMAIL PROTECTED]>

Domestic Sysadmin :-)

Reply via email to