1.批量修改文件名
方法一:
#!/bin/bash
#Date:2019-12-30
#Function:Rename files
Filename=_learn.TXT
Dirname=/study
cd $Dirname || exit 1
for n in `ls`
do
name=$(echo ${n}|awk -F '_' '{print $1}')
mv $n ${name}${Filename}
done
方法二:
rename study.txt learn.TXT *.txt