Hi, On Fri, Feb 18, 2011 at 07:26:18PM -0500, Chet Ramey wrote: > Brace expansion is strictly textual, is performed before all other > expansions, and doesn't understand a whole lot of shell syntax. > It does understand a little about quoted strings, so what you get is > > echo "$(echo "1")" "$(echo "2")" "$(echo "3")" > > The preamble is "$(echo ", the portion to be expanded is {1..3}, and the > postscript is ")".
thank you for clearing that up! Aha, I see. I've read that part about "strictly textual" and "performed before all other expansions" in the manual, but I didn't realize all the consequences. This means that my quotes get interpreted *after* the brace expansion is done, right? As a result, a call like echo "$(echo "{1..3}')' ends up as echo "$(echo "1')' "$(echo "2')' "$(echo "3')' and that surely won't work. This makes a lot more sense now. Thanks again, Peter