On 17 Jan 2008, [EMAIL PROTECTED] wrote: > Puneet> I tried ps -elo pid,args|grep "myprocess\\!(grep)" > > The argument of grep is a regular expression (type 3 language), and > there is no way you can do this in a type 3 language. Even 'grep' also > matches 'grep' text when you pass '-v grep' argument to 'grep' command > line, and then only outputs unmatched lines.
I used two pipes to eliminates the extraneous grep, until some pointed out that all you need to do it make the regexp different from the matched string, viz. $ ps -e | grep "[m]ysql" Elegant, I thought. -- Alok Why won't sharks eat lawyers? Professional courtesy. _______________________________________________ ilugd mailinglist -- ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd Next Event: http://freed.in - February 22/23, 2008 Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi http://www.mail-archive.com/ilugd@lists.linux-delhi.org/