dev*_*per 32 linux bash shell sh ash
\nshell字符串中不考虑新行
root@toto:~# str="aaa\nbbbb"
root@toto:~# echo $str
aaa\nbbbb
Run Code Online (Sandbox Code Playgroud)
预期结果:
root@toto:~# echo $str
aaa
bbbb
Run Code Online (Sandbox Code Playgroud)
如何在字符串中添加新行?