当前位置: 首页 > 工具软件 > globbing > 使用案例 >

Bash Globbing/通配

薛飞星
2023-12-01

Bash语言不支持正则表达式,而是通配的使用方式。sed awk 等工具支持正则表达式。

Bash itself cannot recognize Regular Expressions. Inside scripts, it is commands and utilities – such as sed and awk – that interpret RE’s.

Bash does carry out filename expansion [1] – a process known as globbing – but this does not use the standard RE set. Instead, globbing recognizes and expands wild cards.

Question mark – (?)

一对一通配。

Asterisk – (*)

0或者多个

Caret – (^)

[]: outside: select
[]: inside: highlight

Exclamatory Sign – (!)

outside caret

Dollar Sign – ($)

end

Curly bracket – ({})

多个globbing

References

[1] bash_globbing_tutorial
[2] parallel_cheatsheet

 类似资料: