bug-grep
[Top][All Lists]
Advanced

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

Re: egrep -i -c


From: Paolo Bonzini
Subject: Re: egrep -i -c
Date: Fri, 11 Mar 2011 11:48:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

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
50
address@hidden:~# egrep -i "^[^a-r]*$" /usr/share/dict/british-english  -c
98297
address@hidden:~# egrep -ic "^[^a-r]*$" /usr/share/dict/british-english
98297

     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.

Paolo



reply via email to

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