echoing whitespace from a command substitution
I have run into a problem in a script where I want to preserve whitespace in a statement similar to:
echo $(ls -l)
The newline characters appear to be dropped. echo's -e option did not change the behavior, can anyone give insight into how bash interprets the above line? Thanks!
all you need is paired quotation marks
Make that paired double quotation marks: using single quotation marks will echo the command string itself -- as you will find out if you try it.
It's a long & daunting document, but the bash man page is a starting point. Good luck.
|All times are GMT -5. The time now is 08:34 PM.|