[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
while <() bug ?!
From: |
rollor |
Subject: |
while <() bug ?! |
Date: |
Wed, 18 Feb 2004 15:26:47 -0300 |
hi,
I do not know if it is really a bug,
it seems to me.
It is about the <() construction. When
it is used in a while it not work, but:
$ foo=foo
$ read -u63 foo <(echo bar)
2>/dev/null
$ echo $foo
bar
$ while read foo; do echo $foo; done
<(echo bar)
-/bin/bash: syntax error near
unexpected token `<(echo bar)'
$ foo=foo
$ exec 3< <(echo bar)
$ while read -u3 foo; do echo $foo;done
bar
$ foo=foo
$ exec 3< <(echo bar)
$ while read foo; do echo $foo;done 0<&3
bar
$ while read foo; do echo $foo; done <
<(echo bar)
bar
so, while and read together can read
from a fd, but when I use
while read l;do ..;done <(command)
it return a sintax error, why ?!
it is a bug in the syntax check ?!
and why using while ....; done <
<(cmd) works ?
please CC to me.
system:
$ echo $BASH_VERSION
2.05b.0(1)-release
running linux.
best regards,
rollor.
__________________________________________________________________________
Acabe com aquelas janelinhas que pulam na sua tela.
AntiPop-up UOL - É grátis!
http://antipopup.uol.com.br/
- while <() bug ?!,
rollor <=