http://www.grymoire.com/Unix/Quote.html显示特殊字符的列表。有没有echo的参数/选项,我可以把echo作为一个字符串后的所有内容?转义中的特殊字符
在Python中,我可以使用"""..."""
或'''...'''
。
$ python
>>> text = '''#"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&'''
>>> print text
#"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&
我可以做Unix的回声一样与'''
但不"""
,为什么会这样?
$ echo #"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&
$ echo '''#"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&'''
#"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&
$ echo """'''#"`\|^[email protected]#@%$#$^%$&%^*()?/\;:$#[email protected]$?$$$!&&"""
bash: [email protected]#@%$#$^%$: event not found
,如果我有这样的字符串会发生什么?
#"`\|^[email protected]#@%$#$^%'''$&%^*()?/\;:$#$"""@$?$$$!&&
我该如何回应这样的字符串? (下面的命令不起作用)
echo '''#"`\|^[email protected]#@%$#$^%'''$&%^*()?/\;:$#$"""@$?$$$!&&'''