GNU bug report logs - #17240
[PATCH] grep: no match for the empty string included in multiple patterns

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Fri, 11 Apr 2014 14:07:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17240 in the body.
You can then email your comments to 17240 AT debbugs.gnu.org in the normal way.

Toggle 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#17240; Package grep. (Fri, 11 Apr 2014 14:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 11 Apr 2014 14:07:02 GMT) Full text and rfc822 format available.

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

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: bug-grep <at> gnu.org
Subject: [PATCH] grep: no match for the empty string included in multiple
 patterns
Date: Fri, 11 Apr 2014 23:05:43 +0900
[Message part 1 (text/plain, inline)]
When the empty string is included in multiple, should match all lines.
However, `grep -F' and grep with regex isn't match.

$ printf 'foo\n\n' >pat
$ cat pat
foo

$ echo abc | env LANG=C grep -f pat
abc  <<== expected
$ echo abc | env LANG=C grep -Ff pat
$   <<== unexpected
$ printf '\(\)\\1x\n\n' >pat
$ cat pat
\(\)\1x

$ echo match | env LANG=C grep -f pat
$    <<== unexpected

Norihiro
[patch.txt (text/plain, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 11 Apr 2014 20:26:02 GMT) Full text and rfc822 format available.

Notification sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
bug acknowledged by developer. (Fri, 11 Apr 2014 20:26:03 GMT) Full text and rfc822 format available.

Message #10 received at 17240-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 17240-done <at> debbugs.gnu.org
Subject: Re: bug#17240: [PATCH] grep: no match for the empty string included
 in multiple patterns
Date: Fri, 11 Apr 2014 13:25:18 -0700
[Message part 1 (text/plain, inline)]
Thanks for catching that bug and for the fix.  I found some ways to 
simplify it, and to fix a glitch with CRLF handling that I discovered 
while reviewing it, and installed your patch along with the attached two 
fixup patches.
[0001-grep-cleanup-for-empty-string-fix.patch (text/plain, attachment)]
[0002-grep-cleanup-for-HAS_DOS_FILE_CONTENTS-issue.patch (text/plain, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 May 2014 11:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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