On 10/11, Aaron Schrab rearranged the electrons to read:

> Or you could just make a minor modification to the grep pattern:
> 
>   ps -U $LOGNAME | grep 'r[e]almutt' > /dev/null
> 
> That way grep won't be able to match itself.

You could also just do a:

ps -U $LOGONAME | grep mutt | grep -v grep > /dev/null

"grep -v" tells grep to ignore whatever pattern you specify there.
I haven't tested this on many versions of grep, but I know it works
under AIX, HP-UX and FreeBSD.  YMMV.

- Jamie

Reply via email to