编写添加后缀的shell脚本 给当前目录里的所有文件家后缀名“.html”。 #! /bin/bash source=$1 cd $source for name in * do mv $name $(basename $name.html) done echo "ok"