通配符匹配只对已经存在的文件名作扩展.
而{}模式,则可以对任意文本进行扩展,{}的用法为{扩展1,扩展2,扩展3…}. 例如
cp filename{,.bak} # 相当于cp filename filename.bak vi /tmp/file{a,b,c,d,e} # 相当于vi /tmp/filea /tmp/fileb /tmp/filec /tmp/filed /tmp/file
通配符匹配只对已经存在的文件名作扩展.
而{}模式,则可以对任意文本进行扩展,{}的用法为{扩展1,扩展2,扩展3…}. 例如
cp filename{,.bak} # 相当于cp filename filename.bak vi /tmp/file{a,b,c,d,e} # 相当于vi /tmp/filea /tmp/fileb /tmp/filec /tmp/filed /tmp/file
下一篇:ksh和bash中的变量编辑
容易混淆的小点。。。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M