Subject: bug#29668: grep: Fatal problem with (big) file

From: Norihiro Tanaka <[email-masked]>
Date: Tue, 12 Dec 2017 08:36:36 +0900

On Mon, 11 Dec 2017 23:45:25 +0200
pg <[email-masked]> wrote:

> $ awk '/Volvo/' Tieliikenne5.0.csv | wc -l
> 266175
> $ grep Volvo Tieliikenne5.0.csv | wc -l
> 1638

> $ awk '/N3/' volvot.csv | wc -l
> 17822
> $ grep N3 volvot.csv | wc -l
> 1701

Perhaps, characters not to be able to recognize in your locale included
in Tieliikenne 5.0.csv and volvot.csv are included.  Try below.

--
$ env LC_ALL=C grep 'Volvo' Tieliikenne\ 5.0.csv | wc -l
266175

or

$ grep -a 'Volvo' Tieliikenne\ 5.0.csv | wc -l
266175

--
$ env LC_ALL=C grep N3 volvot.csv | wc -l
17822

or

$ grep -a N3 volvot.csv | wc -l
17822