delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/02/13:43:32

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:to:subject:content-type;
q=dns; s=default; b=V8W8duRcc3WGbmkcMZqIWXU/RjGPmXhNpH3oygVXNUb
xlH+NInqoiMqkvoQi7lokepkhSTd9m/1Bd6/MEP8TIWyz83IUVli7MJIKJzOdzGG
/XLZ8MTMFlOCHZJOympPMu0kyuc34XMZoFam0SRJ22GIlNRcY+UHAXaXBxFDqn0U
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:to:subject:content-type;
s=default; bh=BqVCr37+wehKUHSCqU1zwHNtFU0=; b=uN3TsqVmyi4kO3Fia
Y5MPezQYWVJiDJ2OO7D+iipN2yhRnrzoTp2IhjzSt2Fy79Xaa2YFKitSAjxrsVvK
otEoNnDAnY+YLihed0mmeK/9QI4j1zIqELbYZNQ0GY2yeZT03la9pHPS9LtTh7hR
v1z42TjQHFf5UVUhM6ZmAkx0l4=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=dash, H*r:sk:39.2018, H*MI:1c69fb81, H*M:1c69fb81
X-HELO: mail-ot1-f52.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:to:subject:user-agent; bh=LlkHbPYwWNcphR7pqfdCmXi+pAmy+FnSjUS8lEfB0Zs=; b=NQHb7N/U8LGPhKt3pxy3xh9olgCZwy368G6FzjDkasMo2WcZIOg3sP3bdHYophOFEB PGi+JQh40nJ20/4uGzuy7SB4ME3+Af2LaRnI8NVniToB6+Advmzzax5LpgmGBsiM+Tf6 YSIqaK7dBBTFkglaOnK7BzlEUoazMLajp/wLZTuyYbjDppILBj0YgN3soYFklP9wv4zT hyP/QhLMJvm9ooSpiZWTMTSmdZWjcBxCt92+Wn2796P/va7MDGYlRq+miuIWOQx4gOpB PFiVM5pIFUzO55OFhG6jK4dfLJAoC9z7p2nPv2CcUVWCwS7iYySiXSFQy18h8z93n7fW UNHg==
Message-ID: <5c0427c5.1c69fb81.d71e5.c8ec@mx.google.com>
Date: Sun, 02 Dec 2018 10:43:17 -0800 (PST)
From: Steven Penny <svnpenn AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Bash heredoc on FD 3
User-Agent: Tryst/2.8.0 (cup.github.io/umber/awk/tryst)

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?


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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019