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
> shouldn't it  be more like:
> $ foo() { echo "${1:-"ab"}" "${1:-"ac"}" ; }

Yes, of course. ;)
It so simple, just eval the braces and nothing else.
I did one step too much and discovered that ab is atomar and underlies no 
further evaluation.
So my assumption is correct for this example only, but not for any possible 
string replacing ab as yours.

Alexander


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to