[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: egrep -i -c

From: Bogdan Sass
Subject: Re: egrep -i -c
Date: Fri, 11 Mar 2011 13:02:10 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20110303 Thunderbird/3.1.9

On 11/03/2011 12:48, Paolo Bonzini wrote:
On 03/10/2011 02:32 PM, Bogdan Sass wrote:
     I have encountered the following problem when attempting to combine
the "case insensitive" and "count matches" option of egrep:

address@hidden:~# egrep -i "^[^a-r]*$" /usr/share/dict/british-english |
wc -l
address@hidden:~# egrep -i "^[^a-r]*$" /usr/share/dict/british-english -c
address@hidden:~# egrep -ic "^[^a-r]*$" /usr/share/dict/british-english

     The match is done correctly, but when I try to count the matches
directly from egrep I get way too many results. Is there anything I am
doing wrong here?

What version of grep is this?  It works for me with 2.7.
address@hidden:~# egrep -V
GNU grep 2.6.3

The default version installed by Ubuntu 10.10. There doesn't seem to be an updated version in the Ubuntu repositories...

    Thank you,

Bogdan Sass
Information Systems Security Professional
"Curiosity was framed - ignorance killed the cat"

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]