I am trying to do the following in a bash script:
com=`ssh host "ls -lh"`
echo $com
This works, but the echo will interrupt the output (instead of getting all the rows in the column, I get them all in a row).
If I do: ssh host ls -lhin the CLI, it will give me the correct output and layout.
How to save layout when repeating a variable?
source
share