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?