标签:文件名 host bash done cal 文件 shel 修改文件名 root
[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命令进行修改
标签:文件名 host bash done cal 文件 shel 修改文件名 root
原文地址:https://www.cnblogs.com/kyeup/p/9333389.html