我注意到由 Unix 实用程序格式化的手册页和其他文档通常使用双反引号``
后跟双单引号''
来包装带引号的短语而不是双引号字符"
。单引号同样被替换。为什么是这样?
以下是来自手册页的几个示例grep
:
To find all occurrences of the pattern `.Pp' at the beginning of a line:
$ grep '^\.Pp' myfile
The apostrophes ensure the entire expression is evaluated by grep instead
of by the user's shell. The caret `^' matches the null string at the
beginning of a line, and the `\' escapes the `.', which would otherwise match
any character.
The grep utility is compliant with the IEEE Std …
Run Code Online (Sandbox Code Playgroud) 我经常被问到这样一个问题:
``K.,这个引号的约定从何而来?你知道,那个用两个重音符引入一个带引号的字符串和两个普通的正直单引号结束它的那个?''
我不知道。这是从哪里来的?
我刚刚浏览了几man
页以查找一些不同的命令,包括grep
和ifconfig
。
我在几页上注意到,内容使用一种奇怪的语法来标记我认为是引号的内容(反引号后跟单引号或双引号):
`text'
Run Code Online (Sandbox Code Playgroud)
为什么他们不能使用'
or"
来打开和关闭报价?
更新
我现在意识到这应该加粗字符而不是注释引号。我的系统在格式化时是否有任何原因忽略这些?我正在使用 OSX。