|
From: | Paul Eggert |
Subject: | bug#24347: Bug when grepping a text file with some arbitrary binary data |
Date: | Wed, 31 Aug 2016 23:16:36 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Alexey Dubovkin wrote:
*Expected result:* A full output of the test file since all lines matches 31325
Since you are running 'grep' in a picky locale where that file is not a text file, grep treats the file as binary data. If you want the file to be treated as text, then set the locale to something more generous, or use grep -a. Either of the following shell commands should work with grep 2.25:
LC_ALL=C grep 31325 test grep -a 31325 test
[Prev in Thread] | Current Thread | [Next in Thread] |