Some questions about the Linux shell script playbook

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


Note: the following applies only to Bash, other shell such as zsh may not be compatible.

typographical error.

out=$ (cat a.txt) has the same effect as out= "$(cat a.txt)" . The key to
is the line echo . Keeping newline characters should enclose the variable echo "$out" in double quotes.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b362c2-2bfd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b362c2-2bfd5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?