bash process substitution "<(list)" possible bug
Tom Rodman
cygzw@trodman.com
Sat Mar 10 15:14:00 GMT 2007
test script "/tmp/foo", and test run showing the problem:
~ $ cat /tmp/foo
#!/bin/bash
file=$1
TMPF=$(mktemp /tmp/XXXXXX)
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/RIV456
+ cat /tmp/RIV456
ABC
~ $ date;uname -a
Sat Mar 10 09:09:22 CST 2007
CYGWIN_NT-5.0 argon 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin
~ $ cygcheck -c|grep bash
bash 3.2.9-11 OK
~ $
The 'test -s "$file"' in the test run above should return 0.
--
thanks,
Tom
linux test case:
--v-v------------------C-U-T---H-E-R-E-------------------------v-v--
~ $ cat /tmp/foo
#!/bin/bash
file=$1
TMPF=$(mktemp /tmp/XXXXXX)
set -x
test -s "$file" || echo $?
cp $file $TMPF
cat $TMPF
~ $ /tmp/foo <(echo ABC)
+ test -s /dev/fd/63
+ cp /dev/fd/63 /tmp/1HLI14
+ cat /tmp/1HLI14
ABC
~ $ date;uname -a
Sat Mar 10 08:38:30 CST 2007
Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 GNU/Linux
~ $
--
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/
More information about the Cygwin
mailing list