GNU bug report logs - #20088
-a changes whether a match is found

Previous Next

Package: grep;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Wed, 11 Mar 2015 17:39:02 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

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 20088 in the body.
You can then email your comments to 20088 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#20088; Package grep. (Wed, 11 Mar 2015 17:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Meyering <jim <at> meyering.net>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Wed, 11 Mar 2015 17:39:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: bug-grep <at> gnu.org
Cc: Andreas Schwab <schwab <at> suse.de>
Subject: -a changes whether a match is found
Date: Wed, 11 Mar 2015 10:38:28 -0700
--text (-a) is documented to change only the output, not grep's exit status.
Yet, it does change the exit status here:

  $ printf "a\0b\n" | LC_ALL=C src/grep -la a.b; echo $?
  (standard input)
  0
  $ printf "a\0b\n" | LC_ALL=C src/grep -l  a.b; echo $?
  1

Noted by Andreas Schwab in https://bugs.gnu.org/20080.




Information forwarded to bug-grep <at> gnu.org:
bug#20088; Package grep. (Wed, 11 Mar 2015 18:03:01 GMT) Full text and rfc822 format available.

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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jim Meyering <jim <at> meyering.net>, 20088 <at> debbugs.gnu.org
Cc: Andreas Schwab <schwab <at> suse.de>
Subject: Re: bug#20088: -a changes whether a match is found
Date: Wed, 11 Mar 2015 11:02:42 -0700
[Message part 1 (text/plain, inline)]
On 03/11/2015 10:38 AM, Jim Meyering wrote:
> --text (-a) is documented to change only the output, not grep's exit status.
>

It is documented, albeit too tersely.  I tried to improve it by 
installing the attached.
[0001-doc-clarify-how-a-matches.patch (text/x-patch, attachment)]

Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Wed, 11 Mar 2015 21:54:02 GMT) Full text and rfc822 format available.

Notification sent to Jim Meyering <jim <at> meyering.net>:
bug acknowledged by developer. (Wed, 11 Mar 2015 21:54:02 GMT) Full text and rfc822 format available.

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

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Andreas Schwab <schwab <at> suse.de>, 20088-done <at> debbugs.gnu.org
Subject: Re: bug#20088: -a changes whether a match is found
Date: Wed, 11 Mar 2015 14:53:26 -0700
On Wed, Mar 11, 2015 at 11:02 AM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> On 03/11/2015 10:38 AM, Jim Meyering wrote:
>>
>> --text (-a) is documented to change only the output, not grep's exit
>> status.
>
> It is documented, albeit too tersely.  I tried to improve it by installing
> the attached.

Thanks, Paul.  In which case I'm closing this issue, too.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Apr 2015 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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