|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
×
在Linux下编写了一个bash脚本,对jpg格式的图片进行了批量重命名,功能简单,欢迎完善
#!/bin/bash
#Program:
# This program is to rename the pictures whose type is '.jpg' together
#History:
# 2013/10/6 David First release
count=1
for img in *.jpg
do
new=$count.${img##*.}
mv "$img" "$new" 2>/dev/null
if [ $? -eq 0 ];
then
echo "Renaming $img to $new"
let count++
fi
done |
|