Skip to content

Instantly share code, notes, and snippets.

@ellcom
Created September 4, 2014 10:40
Show Gist options
  • Save ellcom/440fd803ec00040dccd9 to your computer and use it in GitHub Desktop.
Save ellcom/440fd803ec00040dccd9 to your computer and use it in GitHub Desktop.
Remove @1x from file names in a directory
#!/bin/sh
for f in *@1x.png; do
echo "$f"
echo "${f%@1x.*}.png"
mv "$f" "${f%@1x.*}.png"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment