致力于Ubuntu中文推广http://forum.ubuntu.com.cn/
http://forum.ubuntu.com.cn/viewtopic.php?t=128824
代码: 全选
脚本开始後,供用户提供一个目录,之後脚本遍历该目录及其子目录,将所有 .txt 文件改名为 .sh
find /some/directory/ -name "*.txt" -exec rename 's/\.txt$/.sh/' {} \;