标签:批量改名
ls |awk -F[.] ‘{print "mv" " " $0 " "$1".jpg"}‘|bash
for i in $(ls);do mv $i ${i%jpg}txt ;done
------------------------------------------》脚本传参改名
#!/bin/bash
a=$(ls /tmp/*.$1)
for i in $a
do
mv $i ${i%$1}$2
done
for i in $(ls);do mv $i ${i/jpg/txt} ;done
rename .txt .jpg *.txt
本文出自 “12177655” 博客,谢绝转载!
标签:批量改名
原文地址:http://12187655.blog.51cto.com/12177655/1974027