Skip to content

Instantly share code, notes, and snippets.

@gingertom
Created February 26, 2013 12:26
Show Gist options
  • Save gingertom/5038086 to your computer and use it in GitHub Desktop.
Save gingertom/5038086 to your computer and use it in GitHub Desktop.
Renames all the images in a folder to add @2x between the filename and the extension. Usage (run in the folder to affect): path/to/renamer/renamer.sh
#!/bin/sh -e
cd "${1-.}"
for f in *; do
mv "$f" "${f%.*}@2x.${f##*.}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment