我有一些以’.1’结尾的文件,例如:
example.file.ex1.1 example.file.ex2.1 example.file.ex3.1
有没有办法可以快速重命名它们而不使用末尾的’.1′(例如example.file.ex1,example.file.ex2等)?
谢谢!
解决方法
纯粹的bash解决方案:
for curFile in example.file.*.1; do mv -- "$curFile" "${curFile:0:-2}" done
我有一些以’.1’结尾的文件,例如:
example.file.ex1.1 example.file.ex2.1 example.file.ex3.1
有没有办法可以快速重命名它们而不使用末尾的’.1′(例如example.file.ex1,example.file.ex2等)?
谢谢!
纯粹的bash解决方案:
for curFile in example.file.*.1; do mv -- "$curFile" "${curFile:0:-2}" done
【声明】:淮南站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。