> Could someone explain the following behaviour for me? Because I > sure do not understand it. > > [EMAIL PROTECTED]:/tmp/foo$ touch 1 2 3 4 5 > [EMAIL PROTECTED]:/tmp/foo$ foo=`ls` > [EMAIL PROTECTED]:/tmp/foo$ /bin/echo $foo > 1 2 3 4 5 > [EMAIL PROTECTED]:/tmp/foo$ /bin/echo "$foo" > 1 > 2 > 3 > 4 > 5
I assume the newlines are the part you don't understand. That's it. Command substitution works by the shell creating a pipe to capture the output; when ls sees that it is writing to a pipe, it defaults to -1 instead of -C. Urgh, thanks for the explanation. I suppose this can't be changed right? Cause I think it is a annoying behaviour... _______________________________________________ Bug-coreutils mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-coreutils
