bug-grep
[Top][All Lists]
Advanced

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

bug#23763: Bug report: Grep stops, if a text file contains a null charac


From: Paul Eggert
Subject: bug#23763: Bug report: Grep stops, if a text file contains a null character after 32768 bytes
Date: Mon, 13 Jun 2016 15:19:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 06/13/2016 01:52 PM, Bjoern Voigt wrote:
The manual page says
about the auto guessing code:

That's a typo in the man page, and I installed the attached patch to fix it. This should address the first four points you mentioned. As for the remaining points, grep does not consider binary data to be an error. Although there is a judgment call as to whether a matching-lines notification should be sent to stdout or stderr when input contains binary data, grep has been behaving this way for some time (GNU diff even longer) and it would be a hassle to change it at this point.

For GNU grep, you should be able to work around the issue by using the -a option. Other grep implementations may or may not work; in my experience, sending NUL bytes to them can sometimes make them dump core or artificially truncate their output.

Attachment: 0001-doc-remove-obsolete-MS-DOS-mention.patch
Description: Source code patch


reply via email to

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