-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>>>> "Puneet" == Puneet Lakhina <[EMAIL PROTECTED]> 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. References: [1] - http://en.wikipedia.org/wiki/Pidof HTH - -- Ashish Shukla आशीष शुक्ल http://wahjava.wordpress.com/ ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHjxaoHy+EEHYuXnQRAhSeAJ9xqesGE9zmVAxwrra5qL2vK2Va3QCfbIIH OGJttE+PSg5/oPivzZKcrBA= =hoWY -----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/