delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/29/23:05:36

X-Spam-Check-By: sourceware.org
Message-ID: <465CE9DE.4030907@alumni.rice.edu>
Date: Tue, 29 May 2007 22:05:02 -0500
From: "B. K. Oxley (binkley)" <binkley AT alumni DOT rice DOT edu>
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: more on Re: bash process substitution "<(list)" [spot the difference]
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

I am exploring how process substitution works on Cygwin.  I have scripts 
which run fine on Linux but not on Windows XP.

Why does one of these scripts produce an error and the other does not?

Script #1:

$ cat a
#!/bin/bash

function f()
{
    echo "$1"
    cat "$1"
}

f <(echo OK)

$ ./a
/proc/self/fd/63
OK

Script #2:

$ cat b
#!/bin/bash

function f()
{
    ls -l "$1"
    cat "$1"
}

f <(echo OK)

$ ./b
lrwxrwxrwx 1 luser None 0 May 29 15:49 /proc/self/fd/63 -> pipe:[1728]
cat: /proc/self/fd/63: No such file or directory

Thanks,
--binkley
http://binkley.blogspot.com/


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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