相关疑难解决方法(0)

为什么 Unix 手册页使用双反引号代替双引号?

我注意到由 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)

man history

36
推荐指数
2
解决办法
3395
查看次数

这个引号 (`` ...'') 的约定从何而来?

我经常被问到这样一个问题:

``K.,这个引号的约定从何而来?你知道,那个用两个重音符引入一个带引号的字符串和两个普通的正直单引号结束它的那个?''

我不知道。这是从哪里来的?

history quoting

8
推荐指数
1
解决办法
308
查看次数

手册页引号字符

我刚刚浏览了几man页以查找一些不同的命令,包括grepifconfig

我在几页上注意到,内容使用一种奇怪的语法来标记我认为是引号的内容(反引号后跟单引号或双引号):

`text'
Run Code Online (Sandbox Code Playgroud)

报价示例

为什么他们不能使用'or"来打开关闭报价?

更新

我现在意识到这应该加粗字符而不是注释引号。我的系统在格式化时是否有任何原因忽略这些?我正在使用 OSX。

osx man quoting locale roff

8
推荐指数
2
解决办法
1204
查看次数

标签 统计

history ×2

man ×2

quoting ×2

locale ×1

osx ×1

roff ×1