Skip to content

Instantly share code, notes, and snippets.

@mgruesbeck
Last active January 27, 2016 06:59
Show Gist options
  • Save mgruesbeck/0c575e747b930f49eabe to your computer and use it in GitHub Desktop.
Save mgruesbeck/0c575e747b930f49eabe to your computer and use it in GitHub Desktop.
Renaming shit
#!/bin/sh
num=1
for file in *.jpg; do
mv "$file" "rename_shit$(printf "%u" $num).jpg"
let num=$num+1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment