emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50129: closed (-f - option doesn't respond to single EOF from TTY.)


From: GNU bug Tracking System
Subject: bug#50129: closed (-f - option doesn't respond to single EOF from TTY.)
Date: Fri, 20 Aug 2021 15:26:02 +0000

Your message dated Fri, 20 Aug 2021 08:25:12 -0700
with message-id <0ac56bc0-016a-2840-e877-ac9036137bf0@cs.ucla.edu>
and subject line Re: bug#50129: -f - option doesn't respond to single EOF from 
TTY.
has caused the debbugs.gnu.org bug report #50129,
regarding -f - option doesn't respond to single EOF from TTY.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
50129: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50129
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: -f - option doesn't respond to single EOF from TTY. Date: Thu, 19 Aug 2021 17:59:53 -0700 User-agent: Roundcube Webmail/0.9.2
This reproduces on grep 3.1 on Ubuntu.

The command:

   grep -f -

should accept a list of patterns from standard input, like this:

   $ grep -f -
   pat1
   pat2
   pat3
   [Ctrl-D]

Upon receiving the EOF indication (zero byte read), the program
should immediately conclude that the list of patterns has ended,
and begin processing the input using the patterns.

This does not seem to be working. After a single Ctrl-D, grep is
still accumulating patterns:

It appears that Ctrl-D must be issued twice:

   $ grep -f -
   pat1
   [Ctrl-D] ;; effectively ignored
   pat2     ;; can add more patterns
   pat3
   [Ctrl-D]
   [Ctrl-D] ;; OK, now we are in the matching loop.
   pat3blahblah
   pat3blahblah
   ...

Cheers ...



--- End Message ---
--- Begin Message --- Subject: Re: bug#50129: -f - option doesn't respond to single EOF from TTY. Date: Fri, 20 Aug 2021 08:25:12 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0
On 8/19/21 5:59 PM, Kaz Kylheku wrote:
This reproduces on grep 3.1 on Ubuntu.

That's a pretty old version of grep. I cannot reproduce the problem on Ubuntu 21.04, which has grep 3.6. So it sounds like the bug is fixed, and you can fix your problem by upgrading to a more-recent Ubuntu version.

(Not that anyone would ever want to *use* plain "grep -f -", except perhaps to file bug reports....)


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]