GNU bug report logs - #19348
grep-2.21 cannot match patterns with NULLs in binary files

Previous Next

Package: grep;

Reported by: Jaroslav Skarvada <jskarvad <at> redhat.com>

Date: 2014年12月11日 15:32:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 19348 AT debbugs.gnu.org.

the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#19348; Package grep. (2014年12月11日 15:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jaroslav Skarvada <jskarvad <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (2014年12月11日 15:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jaroslav Skarvada <jskarvad <at> redhat.com>
To: bug-grep <at> gnu.org
Subject: grep-2.21 cannot match patterns with NULLs in binary files
Date: 2014年12月11日 10:31:24 -0500 (EST)
Hi,
commit 8cc20c82a747460991305b0d8d72faf6830298f4,
"grep: non-text bytes in binary data may be treated as line ends"
added optimization that NULLs are treated as line ends. This is
change of behaviour that may break other tools. Currently I know
about [1], [2]. This new behaviour is not documented in manual page,
it is only briefly mentioned in the NEWS file.
I also think that the old behaviour is useful, so command line switch
for this would be probably handy
thanks & regards
Jaroslav
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1172405
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1172804

Information forwarded to bug-grep <at> gnu.org:
bug#19348; Package grep. (2014年12月12日 05:25:02 GMT) Full text and rfc822 format available.

Message #8 received at 19348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jaroslav Skarvada <jskarvad <at> redhat.com>, 19348 <at> debbugs.gnu.org
Subject: Re: bug#19348: grep-2.21 cannot match patterns with NULLs in binary
 files
Date: 2014年12月11日 21:24:35 -0800
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.

Severity set to 'wishlist' from 'normal' Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (2014年12月12日 05:26:01 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.

AltStyle によって変換されたページ (->オリジナル) /