为什么bash用重音和撇号来封装语法错误?


14

当bash报告语法错误时,它会封装带有严重口音和撇号的引发语法错误的文本,如下所示:`...'。知道为什么吗?

这是一个例子:

$ bash -c "echo error()"
bash: -c: line 0: syntax error near unexpected token `('
bash: -c: line 0: `echo error()'

这不是很常见。但是,我很好奇,这不是一个真正的问题。

编辑:这像这样的晦涩的消息变得古怪:

-bash: unexpected EOF while looking for matching ``'


Answers:


By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.