Skip to content

Commit ff00caf

Browse files
committed
docs(expansion): edit * expansion
1 parent 562a034 commit ff00caf

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

docs/expansion.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,14 @@ aA1b aA2b aB3b aB4b
319319
大括号也可以与其他模式联用,并且总是先于其他模式进行扩展。
320320

321321
```bash
322-
$ echo {cat,d*}
323-
cat dawg dg dig dog doug dug
322+
$ echo /bin/{cat,d*}
323+
/bin/cat /bin/b2sum /bin/base32 /bin/base64 ... ...
324+
325+
# 基本等同于
326+
$ echo /bin/cat;echo /bin/b*
324327
```
325328

326-
上面例子中,会先进行大括号扩展,然后进行`*`扩展。
329+
上面例子中,会先进行大括号扩展,然后进行`*`扩展,等同于执行两条`echo`命令
327330

328331
大括号可以用于多字符的模式,方括号不行(只能匹配单字符)。
329332

0 commit comments

Comments
 (0)