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

2007-05-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to B. K. Oxley (binkley) on 5/29/2007 9:05 PM: > Why does one of these scripts produce an error and the other does not? > function f() > { >echo "$1" shell builtin, and it does not touch the fifo (try replacing this with /bin/echo to see

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

2007-05-29 Thread Larry Hall (Cygwin)
B. K. Oxley (binkley) wrote: > 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() > { >

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

2007-05-29 Thread B. K. Oxley (binkley)
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/se

Re: bash process substitution "<(list)"

2007-03-10 Thread Tom Rodman
On Sat 3/10/07 15:55 MST Eric Blake wrote: > According to Tom Rodman on 3/10/2007 8:14 AM: > > ~ $ /tmp/foo <(echo ABC) > > + test -s /proc/self/fd/63 > > + echo 1 > > > > The 'test -s "$file"' in the test run above should return 0. > > How do you figure? pipes are special file types, and

Re: bash process substitution "<(list)" possible bug

2007-03-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Tom Rodman on 3/10/2007 8:14 AM: > ~ $ /tmp/foo <(echo ABC) > + test -s /proc/self/fd/63 > + echo 1 > > The 'test -s "$file"' in the test run above should return 0. How do you figure? pipes are special file types, and st_size is u

bash process substitution "<(list)" possible bug

2007-03-10 Thread Tom Rodman
test script "/tmp/foo", and test run showing the problem: ~ $ cat /tmp/foo #!/bin/bash file=$1 TMPF=$(mktemp /tmp/XX) set -x test -s "$file" || echo $? cp $file $TMPF cat $TMPF ~ $ /tmp/foo <(echo ABC) + test -s /proc/self/fd/63 + echo 1 1 + cp /proc/self/fd/63 /tmp