linux批量更改文件后缀名的脚本

#!/bin/sh
##change filename of *.txt to *.doc
##Written by adai
read -p "Please input a directory:" f
echo "Old filename:"
ls $f
for i in `ls $f | grep '.pcm' | awk -F"." '{print $1}'`
do
mv $f/$i.pcm $f/$i.mp4
done
echo "New filename:"
ls $f

发表评论

邮箱地址不会被公开。 必填项已用*标注