Skip to content

Instantly share code, notes, and snippets.

@leonardehrenfried
Created November 19, 2011 12:49
Show Gist options
  • Save leonardehrenfried/1378805 to your computer and use it in GitHub Desktop.
Save leonardehrenfried/1378805 to your computer and use it in GitHub Desktop.
Rename file consecutively
cnt=1
for file in `ls *.jpg` ; do
mv ${file} ${cnt}.jpg
#echo ${file}
cnt=$(( cnt +1 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment