I'm making a shell script that does an rsync
I want to set a variable with the output I get from rsync --stats
If I run the variable in the terminal, the output is displayed on multiple lines
If I do it in my script:
#!/bin/bash
OUTPUT=$(/usr/bin/rsync -az --stats -h SOURCE DESTINATION)
echo -e "$OUTPUT"
Then, the output I get is all multiple lines concatenated in one line
How do I keep the formatting I get when I run the command in the terminal ?