-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
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()
> {
>
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
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
-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
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
6 matches
Mail list logo