# 创建shell脚本文件
vim name.sh
#!/bin/bash
for i in `ls *.$1`
do
mv $i `echo "$i"|awk -F . '{print $1}'`.$2
done
# 执行脚本
sh name.sh bbb abcd
# 创建shell脚本文件
vim name.sh
#!/bin/bash
for i in `ls *.$1`
do
mv $i `echo "$i"|awk -F . '{print $1}'`.$2
done
# 执行脚本
sh name.sh bbb abcd