Bash通配符总结

Bash通配符总结

通配符用于文件名/路径扩展, 不同于正则表达式.

?(pattern)

匹配pattern, 0次或1次

?

匹配任意字符, 1次

*(pattern)

匹配pattern, >=0次

*

匹配任意字符串, 包括空串

+(pattern)

匹配pattern, >=1次

@(pattern)

匹配pattern, ==1次

!(pattern)

匹配不匹配pattern, ==1次

猜你喜欢

转载自www.cnblogs.com/black-watch/p/12909935.html