Skip to content

Instantly share code, notes, and snippets.

@surgicalmaskman
Created February 2, 2015 09:38
Show Gist options
  • Save surgicalmaskman/4b6cb71788f3282a9e2d to your computer and use it in GitHub Desktop.
Save surgicalmaskman/4b6cb71788f3282a9e2d to your computer and use it in GitHub Desktop.
rename
#!/bin/bash
a=1
for i in RIMG*.JPG; do
s=$(printf "RIMG%04d.JPG" $a)
echo $s
mv -f $i $s
let a="${a}+10"
done
@surgicalmaskman
Copy link
Author

既存のファイル名に+10できればうれしい。
I want to rename a filename A001 to A0010.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment