delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/03/10:43:48

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=UGXff/hXTV4V0FXn
ljcjpDOZGYjDbO8b5aG3LICuFZn/b/0fvUd73LxuWhPxLnfIpahjnYbbOAXchzPr
qGExQgsMRDy6WUSyprBmgBx3aW6wPcZYEJ4vkvBztICwn2w4jKnMmYPcMqEmoy9n
ePmcNRQwo9TZ+X0VwO5G3bVHWts=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=h/DBuHhSYw9XuIwdUuNegn
nVz8Y=; b=gzyqSpCEEQincA5vhDcl30icjcNwi0oqyIeM3txp13UKf+BIJ4wWYe
95L4T0bTyfa/dJEfboQPH+rsGhyhMCOrkJKmL3MynSCJyTDGccTpFwZUT/+vB5cJ
9cxho9FxK+Q8p84uBdHQxQ5IX/XYtXEsH5N5J1q0X9aZ7n1Y8shGI=
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=Hx-languages-length:930, HContent-Transfer-Encoding:8bit
X-HELO: mail-io1-f44.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=uAnZQyBop6lrR03qYK7FmEOudQkUoFZGExXcCArgfDw=; b=p7BrlT3CWaBWaKVEhiQNpDeC0ZP2mkFjTZMVYjV0oJlE1/JiLY5UZeAKeWmNDXsJFG bDwP4+PGlZaklAe3KhlpX8rgizuEbXvMwnDhIcpHBIjWrQ35MgVKCUmmS0jvd6SWsPj+ x6MvlNQQog9RB4uadmqsYnlMQbrpuy0B2V+UVlFaBtwxqr5q1NRIRbNTJ8wll6t+vCrp FChw71wAJy54YMtN8rON/Lg8M+cH9+9KywY3b6VmZmMVcufIwsnO8k606TSiqD5vXBhb W2qjoWGt43cLgRPFenCWod4jgGk5ywwEhHdADnYf24If90N+EV4dGlwbmNC1Q2dGVCbb plPQ==
Subject: Re: Bash heredoc on FD 3
To: cygwin AT cygwin DOT com
References: <5c0427c5 DOT 1c69fb81 DOT d71e5 DOT c8ec AT mx DOT google DOT com>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <b153a5b5-deea-c039-e93a-0555d8e2dba8@gmail.com>
Date: Mon, 3 Dec 2018 10:43:31 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2
MIME-Version: 1.0
In-Reply-To: <5c0427c5.1c69fb81.d71e5.c8ec@mx.google.com>
X-IsSubscribed: yes
Note-from-DJ: This may be spam

On 12/2/2018 1:43 PM, 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?

Same for me and interestingly:

$ ls -ld /dev/fd/*
ls: cannot access '/dev/fd/3': No such file or directory
ls: cannot access '/dev/fd/31': No such file or directory
lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/0 -> /dev/pty2
lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/1 -> /dev/pty2
lrwxrwxrwx 1 eboyd53 eboyd53 0 Dec  3 10:39 /dev/fd/2 -> /dev/pty2

-- 
cyg Simple

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