SHELL:多文件的重命名和移动
作者:互联网
rename
find
mv
#实现查找png 和 jpeg文件
#!/bin/bash
#file name: rename.sh
#use: rename.jpg and .png files
count=1;
for img in `find . -iname '*.png' -o -iname '*.jpg' -type f -maxdepth 1`
do
new=image-$count.${img##*.}
echo "Renaming $img to $new"
mv "$img" "$new"
let count++
done
标签:重命名,rename,SHELL,iname,img,count,new,移动,png 来源: https://www.cnblogs.com/zhg1016/p/10530203.html