大多数手册页不包含一些常见示例是否有原因?他们通常会解释所有可能的选项,但这使得初学者更难理解它“通常”是如何使用的。
因此,man git init在 Ubuntu 14.04 系统上输入bash 提示符似乎与 相同man git-init,只是我不太确定如何。
(ie )的man页面似乎不允许这种构造,除非是手册的 a ,但手册页似乎来自 section 。manman mangitsection1
这是man?支持的未记录用法?我误解了 的文档man吗?是否有其他魔法发生?有人愿意解释吗?
我知道这些命令将有助于获取命令的语法和选项,但我的问题是它们之间有何不同?
下载 Bash 的源代码后,我浏览了doc目录并遇到了以下文件:
这些控制字符不会显示在 Git Web 界面提供的表示中,但可以下载实际文件并在 Vim 等文本编辑器中检查。
在fileon 上运行命令会bash.0打印以下输出:
bash.0: ASCII text, with overstriking
Run Code Online (Sandbox Code Playgroud)
我以前从未遇到过这种文件格式,我想知道它的用途是什么以及如何使用。在 Web 上搜索短语“ASCII 文本,加粗”并不是很有启发性。
我不知道如何通过这些man页面提供我自己开发的专业脚本(主要用 Bash 和 Perl 编写)。
我必须遵循什么程序,是否需要编写特定格式的文档才能执行此操作?
我无法理解命令手册页中的 SYNOPSIS 部分。例如,让我们看看man它本身的联机帮助页。由man man:
SYNOPSIS
man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L
locale] [-m system[,...]] [-M path] [-S list] [-e extension] [-i|-I]
[--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P
pager] [-r prompt] [-7] [-E encoding] [--no-hyphenation] [--no-justifi?
cation] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z]
[[section] page ...] ...
man -k [apropos options] regexp ...
man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
man -f [whatis options] page ...
man -l [-C file] …Run Code Online (Sandbox Code Playgroud) 我注意到由 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)