bash pipe fails in script with subshell/loop cmbination

Ronald Fischer ynnor@mm.st
Tue Aug 8 14:20:00 GMT 2017


> 
> TWO - this fails, apparently (warning: my guess) at the pipe
> $ for j in 1 2;do echo $j $(echo hello | cat);done
> 1
> 2

This works for me:

$ for j in 1 2;do echo $j $(echo hello | cat);done
1 hello
2 hello

I have:

GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)

Ronald

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



More information about the Cygwin mailing list