-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ,--[ On Thu, Jan 17, 2008 at 09:55:33AM +0000, pj wrote: | Ashish Shukla आशीष शुक्ल <[EMAIL PROTECTED]> writes: | | > >>>>> "Puneet" == Puneet Lakhina <puneet.lakhina <at> gmail.com> writes: | > Puneet> Hi, | > Puneet> I have to frequently find the process ids of particular processes | using a | > Puneet> combination of ps and grep. | > | > You can try 'pidof'[1], if you're simply interested in find pid of a | > process :) | > | > [snipped] | > | > Puneet> But I was wondering if there was a way for me to specify this in | the regular | > Puneet> expression for the first grep itself. | > | > 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 just noticed, that I'm able to make a FSM for matching that expression, which implies that I'm wrong. So, I'm sorry. Thanks - -- Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/ ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHjzSDHy+EEHYuXnQRAh1WAJ4yABQLt0KlDukd5gGaqFdLQQYfrwCdGhQj wi0jy/2cJpKullqsav8OB/w= =C6TR -----END PGP SIGNATURE----- _______________________________________________ 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/