bash shell 里的 soft quoting 问题
- 0次
- 2021-07-08 18:12:52
- idczone
soft quoting 里面有$,!,`和\这个四个不会禁用。
但是为什么
[[email protected] ~]# echo "\n"
\n
而
[[email protected] ~]# echo "\\"
\
我已经搞晕了。。
echo "/\n"
The backslash retains its special meaning only when followed by one of the following characters:
$, `, ", \, or .
LZ 的意思是如果按照 soft quoting 的说法,""不会 disable 掉\,所以 echo "\n"应该会得到 n ,而不是\n 。
get 到点了。。谢谢!