
11 Nov
2011
11 Nov
'11
7:33 a.m.
On 2011-11-11 17:38, Andrew Spiers wrote:
I couldn't google for this. How do I preserve line breaks when assigning the result of something to a variable?
aspiers@cape:~/tmp/horror$ ls -1 file1 file2 file3 aspiers@cape:~/tmp/horror$ echo -e $(ls -1) file1 file2 file3
However, if I've misunderstood and 'ls' is just for use in your example, then take my quoting of echo in my earlier email: echo -e "$(ls -1)" Should do what you want. -- Regards, Matthew Cengia