bug-grep
[Top][All Lists]
Advanced

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

bug#19348: grep-2.21 cannot match patterns with NULLs in binary files


From: Paul Eggert
Subject: bug#19348: grep-2.21 cannot match patterns with NULLs in binary files
Date: Thu, 11 Dec 2014 21:24:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

Jaroslav Skarvada wrote:

This new behaviour is not documented in manual page

The full manual says "When matching binary data, grep may treat non-text bytes as line terminators." See:

http://www.gnu.org/software/grep/manual/html_node/File-and-Directory-Selection.html

[1]https://bugzilla.redhat.com/show_bug.cgi?id=1172405
[2]https://bugzilla.redhat.com/show_bug.cgi?id=1172804

Those are both essentially the same bug, right? And the symptoms are a wrong diagnostic but the application still works? Anyway, I filed a bug report for that application here:

http://bugs.debian.org/772901

because a portable shell script cannot use 'grep' on binary data -- POSIX says the behavior is undefined. It's not clear that GNU grep needs a new option to resurrect the 2.20 behavior, as the -a option suffices here just as well as any new option would, and -a is more portable.





reply via email to

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