Web lists-archives.com

Re: grep < fifo fails




On Wed, 3 Oct 2018 15:37:14, Ole Tange wrote:
> This works:
> 
> $ mkfifo fifo
> $ echo > fifo & grep .  fifo
> [1] 10232
> [1]+  Done                    echo > fifo
> 
> But this fails:
> 
> $ echo > fifo & grep . < fifo
> [1] 11756
> grep: (standard input): Invalid argument
> [1]+  Done                    echo > fifo
> 
> I see the same behavior on MINGW, but I do not see the same behavior on GNU=
> /Linux.

64-@@ bash --version
GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)64
..
64-@@ echo > fifo & grep . < fifo
[1] 1192
[1]+  Done                    echo > fifo
64-@@ grep --version
grep (GNU grep) 3.0
Packaged by Cygwin (3.0-2)
..
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
64-@@ file fifo
fifo: very short file (no magic)
64-@@

@@ bash --version
GNU bash, version 4.4.12(3)-release (i686-pc-cygwin)
..
@@ echo > fifo & grep . < fifo
[1] 4852
[1]+  Done                    echo > fifo
@@ grep --version
grep (GNU grep) 3.0
Packaged by Cygwin (3.0-2)
..
Written by Mike Haertel and others, see <http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS>.
@@ file fifo
fifo: very short file (no magic)
@@

Your version of grep ?????

Regards,
Henri


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple