[root@localhost file1]# ls
a.htm b.htm c.htm d.htm pl.sh
[root@localhost file1]# vi pl.sh
#!/bin/bash
for f in `ls *.htm`
do
mv $f `echo ${f/htm/html}`
done
[root@localhost file1]# sh pl.sh
[root@localhost file1]# ls
a.html b.html c.html d.html pl.sh
[root@localhost file1]#
当前可以使用rename命令进行修改