This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

more on Re: bash process substitution "<(list)" [spot the difference]


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]