Skip to content

Instantly share code, notes, and snippets.

Created July 28, 2013 19:31
Show Gist options
  • Save anonymous/6099791 to your computer and use it in GitHub Desktop.
Save anonymous/6099791 to your computer and use it in GitHub Desktop.
An inflexible bash script for moving sequentially named files. Currently under iteration to make it a function / make it more flexible
for i in {75..0}; do NUM=`printf '%04d' $i`; BIGNUM_PLAIN=$$(($i+1)); BIGNUM=`printf '%04d' $BIGNUM_PLAIN`; mv DSC_$NUM.JPG DSC_$BIGNUM.JPG; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment