emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24347: closed (Bug when grepping a text file with


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24347: closed (Bug when grepping a text file with some arbitrary binary data)
Date: Thu, 01 Sep 2016 06:17:02 +0000

Your message dated Wed, 31 Aug 2016 23:16:36 -0700
with message-id <address@hidden>
and subject line Re: bug#24347: Bug when grepping a text file with some 
arbitrary binary data
has caused the debbugs.gnu.org bug report #24347,
regarding Bug when grepping a text file with some arbitrary binary data
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24347: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24347
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Bug when grepping a text file with some arbitrary binary data Date: Wed, 31 Aug 2016 19:26:28 -0700
Hello,

Please consider to fix a bug. I'd found it while parsing my huge logs and I was able to localize it to grep's version and small test file

Affected versions:
v2.23 - v2.25 && recent master

Steps to reproduce (use the attached test file):
./grep 31325 test

Actual result:
08-31 17:59:47.844 31325 31398 I ServerResponse2: [afm::msg] parse():  parse bytes, salt=qpih6vh1ck, decoded:
Binary file test matches

Expected result:
A full output of the test file since all lines matches 31325

The versions v2.22 and below are not affected
and produces the full file output as expected

Thank you!

Regards,
Alex

Attachment: test
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: 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




--- End Message ---

reply via email to

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