Skip to content

Instantly share code, notes, and snippets.

@tsubauaaa
Created May 21, 2019 11:45
Show Gist options
  • Save tsubauaaa/1c77581217d307ca9b7e49cf7d145f99 to your computer and use it in GitHub Desktop.
Save tsubauaaa/1c77581217d307ca9b7e49cf7d145f99 to your computer and use it in GitHub Desktop.
Rename the file directly below
#! /bin/bash
i=1
for f in IMG_*
do
if [ $i -ge 10 ]; then
mv $f 010_00$i.jpg
else
mv $f 010_000$i.jpg
fi
i=$(( i + 1 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment