On Fri, Feb 18, 2011 at 10:32:13PM +0100, Peter Hofmann wrote: > > $ echo "$(echo "{1..3}")" > 1 2 3 > > Huh?
Brace expansion is a funny thing. My belief at the moment -- I'm sure someone will correct me if I'm wrong -- is that because you've got everything quoted up, it's all seen as one "word" by the parser. And it's a word that just happens to have a brace expansion in it. So, the parser expands it out something like this: $ echo "$(echo "1")" "$(echo "2")" "$(echo "3")" Counting PIDs on my sequentially-generating-PIDs OS seems to confirm that it's running three child processes, so that lends a tiny bit of evidence to my theory.