question 1:
subtitle of p33 page in the book: leave spaces and line breaks by quoting sub-shell.
there are three lines in text.txt, with one number per line, such as 1 2 3
1
2
3
using out=$ (cat text.txt)
echo $out to lose line feeds, and using the method in the book out= "$(cat text.txt)" echo $out still loses newline characters.
[root@centos-linux-7 ~]-sharp uname-r
3.10.0-327.28.3.el7.x86_64