我第一次尝试以冷静的心态浏览手册页,但在 2 分钟后我就感到沮丧。
$ man set
nocaseglob
If set, bash matches filenames in a case-insensitive fashion when performing pathname
expansion (see Pathname Expansion above)
...
-B The shell performs brace expansion (see Brace Expansion above). This is on by default.
从该手册页中提取的几行显示“请参阅上面的路径名扩展”和“请参阅上面的大括号扩展”。但我搜索了整个文档,这不是这样的标题/子标题。我相信,它可以在理论上得到解释,但不能作为一个主题本身。我对吗?或者有什么地方可以获取有关这些的信息吗?
供参考。
$ bash -version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
答案1
甚至 Bash 2.0 手册页也包含这样的部分:支撑扩张。来自 FreeBSD 的档案,联机帮助页bash (1)
适用于 CentOS 3.9:
Brace Expansion
Brace expansion is a mechanism by which arbitrary strings may be gener-
ated. This mechanism is similar to pathname expansion, but the file-
names generated need not exist. Patterns to be brace expanded take the
form of an optional preamble, followed by a series of comma-separated
strings between a pair of braces, followed by an optional postscript.
The preamble is prefixed to each string contained within the braces,
and the postscript is then appended to each resulting string, expanding
left to right.
...
GNU Bash-2.05b 2002 July 15 BASH(1)
我想您只是需要进行更多搜索。
答案2
手册页上面写着搜索。您可以通过键入?( 向后搜索,然后按Pathname Expansion
并点击N以在上一个方向进一步搜索,直到找到定义来完成此操作。