Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
The new line \n is not taken account in the shell strings
\n
root@toto:~# str="aaa\nbbbb" root@toto:~# echo $str aaa\nbbbb
expected result:
root@toto:~# echo $str aaa bbbb
How to add a new line in the string?
$ echo "a\nb" a\nb $ echo -e "a\nb" a b