shell通配符与正则表达式相似但不相同
下面是常用的通配符,亲测有效(尊重原创 - 图片来源):

下面是ls sys*
的结果:

ls system???
将搜索到systemctl
ls syste[mn]d
将搜索到systemd
ls syste[!m]d
将什么也搜索
ls s[x-z]stemd
将搜索到systemd
ls s{ys,yt,yd}temd
将搜索到systemd
shell通配符与正则表达式相似但不相同
下面是常用的通配符,亲测有效(尊重原创 - 图片来源):
下面是ls sys*
的结果:
ls system???
将搜索到systemctl
ls syste[mn]d
将搜索到systemd
ls syste[!m]d
将什么也搜索
ls s[x-z]stemd
将搜索到systemd
ls s{ys,yt,yd}temd
将搜索到systemd
本文标题:shell通配符
本文链接:https://www.haomeiwen.com/subject/dvsdrftx.html
网友评论