Subject: bug#20088: closed (Re: bug#20088: -a changes whether a match is found)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 11 Mar 2015 21:54:02 +0000

Your bug report

#20088: -a changes whether a match is found

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
20088: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20088
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#20088: -a changes whether a match is found
From: Jim Meyering <[email-masked]>
To: Paul Eggert <[email-masked]>
Cc: Andreas Schwab <[email-masked]>, [email-masked]
Date: Wed, 11 Mar 2015 14:53:26 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On Wed, Mar 11, 2015 at 11:02 AM, Paul Eggert <[email-masked]> 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.

Subject: -a changes whether a match is found
From: Jim Meyering <[email-masked]>
To: [email-masked]
Cc: Andreas Schwab <[email-masked]>
Date: Wed, 11 Mar 2015 10:38:28 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

--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.