GNU bug report logs -
#50129
-f - option doesn't respond to single EOF from TTY.
Previous Next
Reported by: Kaz Kylheku <kaz <at> kylheku.com>
Date: Fri, 20 Aug 2021 01:01:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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 ...
This bug report was last modified 3 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.