script

Ubuntu linux下Shell批量重命名文件的实例

2010-12-12 gaoch
将当前目录下面的php文件全部改写为html文件 [bash] for it in *.php; do mv $it “$it.pdf”; done [/bash] 将文件名中的URL转义字符%2E修正为点号. 有时候下载的文件名中含有URL的转义字符,如%2E,%2F等 参见附录:URL转义字符。 [bash] for it in `ls *.pdf|grep “%2E”`; do mv $it … 阅读全文 →