[Tipz] byebye grep -v grep

David N. Blank-Edelman dnb at ccs.neu.edu
Fri Jan 31 12:57:01 EST 2003



On Fri, 31 Jan 2003, Muncus wrote:

> it should work fine for any grep that takes a regex (the brackets just
> make a character class with only one option).

I would think that too , but Ari is right, it doesn't work that way for
either grep or egrep on the linux boxen:

[meddle: ~] % ps -ef|grep '[d]nb'
dnb      25641 25637  0 12:34 ?        00:00:00 /usr/sbin/sshd
dnb      25642 25641  0 12:34 pts/0    00:00:00 -zsh
dnb      25688 25642  0 12:56 pts/0    00:00:00 ps -ef
dnb      25689 25642  0 12:56 pts/0    00:00:00 grep [d]nb

     -- dNb



More information about the Tipz mailing list