Redirecting stdout to variable while printing it

Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do

a=$(svn up)
echo $a

because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?

Thanks,
Ocirne

svn up >tmpout
cat tmpout

try with double quote

a=$(svn up)
echo "$a"
1 Like

Ohmygosh, I had forgotten that... thx!