【发布时间】:2012-12-06 11:23:26
【问题描述】:
其中 m,n 可以是 0 到 100 之间的任意数字,例如
blah_5_9_12192012.txt -> blah_5_9.txt
blah_4_35_12192012.txt -> blah_4_35.txt
我尝试了以下操作,但没有成功
mv blah_?_*_12192012.txt blah_?_*.txt
【问题讨论】:
标签: linux file-rename mv
其中 m,n 可以是 0 到 100 之间的任意数字,例如
blah_5_9_12192012.txt -> blah_5_9.txt
blah_4_35_12192012.txt -> blah_4_35.txt
我尝试了以下操作,但没有成功
mv blah_?_*_12192012.txt blah_?_*.txt
【问题讨论】:
标签: linux file-rename mv
for file in blah_?_*_12192012.txt
do
mv $file ${file/_12192012/}
done
【讨论】: