Bash heredoc on FD 3

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Jan 6 20:18:00 GMT 2019


On Dec  2 10:43, Steven Penny wrote:
> Using this file:
> 
>    $ cat hello.sh
>    awk -f /dev/fd/3 3<<eof
>    BEGIN {
>      print "hello world"
>    }
>    eof
> 
> it runs as expected with Dash:
> 
>    $ dash hello.sh
>    hello world
> 
> However it fails with Bash:
> 
>    $ bash hello.sh
>    awk: fatal: can't open source file `/dev/fd/3' for reading (No such file or
>    directory)
> 
> I tried also with Debian and both Dash and Bash work as expected. What is
> causing Cygwin Bash to fail here?

This should work in the latest developer snapshot uploaded to
https://cygwin.com/snapshots/  Please give it a try.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190106/9bd0332e/attachment.sig>


More information about the Cygwin mailing list