Re: incorrect brace expansion when using default values

2006-09-08 Thread Alexander Elgert
Tatavarty Kalyan schrieb am 08.09.2006 um 11:44:47 (+0800): > >It is because the string > > a{b,c} > >is outside of the quotes. So the brace expansion comes first and > >duplicates > >the arguments to the echo call. > > Yes, as you said the brace expansion is outside the double quotes so > s

Re: incorrect brace expansion when using default values

2006-09-07 Thread Alexander Elgert
the second, apply a string with spaces: $ foo() { echo "${1:-"a{b,c}"}" ; } $ foo "x" x x $ It is because the string a{b,c} is outside of the quotes. So the brace expansion comes first and duplicates the arguments to the echo call. Alexander Elgert ___ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash

Re: Question about variables and for loop

2006-03-19 Thread Alexander Elgert
Paul Jarc schrieb am 18.03.2006 um 20:44:17 (-0500): > Bob <[EMAIL PROTECTED]> wrote: > > XXX='a "b c" d' > > for x in $XXX ; do > > echo $x > > done > > XXX='a "b c" d' > eval "set $XXX" > for x in "$@" ; do > echo $x > done > > If the first element in XXX might sta