From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111177 invoked by alias); 3 Dec 2018 15:43:38 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 111165 invoked by uid 89); 3 Dec 2018 15:43:38 -0000 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 Received: from mail-io1-f44.google.com (HELO mail-io1-f44.google.com) (209.85.166.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Dec 2018 15:43:36 +0000 Received: by mail-io1-f44.google.com with SMTP id f14so5355283iol.4 for ; Mon, 03 Dec 2018 07:43:36 -0800 (PST) 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== Return-Path: Received: from [192.168.0.5] (d47-69-109-131.nap.wideopenwest.com. [69.47.131.109]) by smtp.gmail.com with ESMTPSA id 134sm4405391itl.25.2018.12.03.07.43.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 07:43:34 -0800 (PST) Subject: Re: Bash heredoc on FD 3 To: cygwin@cygwin.com References: <5c0427c5.1c69fb81.d71e5.c8ec@mx.google.com> From: cyg Simple Message-ID: Date: Mon, 03 Dec 2018 15:43:00 -0000 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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg00034.txt.bz2 On 12/2/2018 1:43 PM, Steven Penny wrote: > Using this file: > >    $ cat hello.sh >    awk -f /dev/fd/3 3<    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