Linux shell 脚本 批量修改文件名

1、脚本:renameing.sh

for file in `ls | grep .gz`
do
 newfile=`echo $file | sed "s/$1/$2/g"`
 mv $file $newfile
done

2、文件批量文件

  3、执行sh脚本

sh renameing.sh 20200802 20200825

  

原文地址:https://www.cnblogs.com/wuzaipei/p/13826245.html