[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Grep-devel] grep-2.27 released [stable]
From: |
Dmitry V. Levin |
Subject: |
Re: [Grep-devel] grep-2.27 released [stable] |
Date: |
Wed, 7 Dec 2016 20:26:26 +0300 |
On Wed, Dec 07, 2016 at 04:30:02PM +0100, Vincent Lefevre wrote:
> On 2016-12-06 23:46:30 -0800, Jim Meyering wrote:
> > grep by default now reads all of standard input if it is a pipe,
> > even if this cannot affect grep's output or exit status. This works
> > better with nonportable scripts that run "PROGRAM | grep PATTERN
> > >/dev/null" where PROGRAM dies when writing into a broken pipe.
> > [bug introduced in grep-2.26]
>
> This seems a bad idea. Do this mean that
>
> while true; do echo foo; done | grep . | head
>
> will never terminate?
No, but it probably means that
yes | grep --quiet . || echo yes or grep failed
will never terminate.
--
ldv
pgpPxx5tcGHku.pgp
Description: PGP signature