Last active
September 29, 2015 14:17
-
-
Save sole/1613564 to your computer and use it in GitHub Desktop.
Unretinise files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete not retina files | |
find . -not -iname '*@2x*' -delete | |
# remove @2x suffix | |
# MAC OS DOESN'T HAVE RENAME? SERIOUSLY? LIKE... SERIOUSLYYYYYYYY??? | |
for i in *.jpg; do j=`echo $i | sed 's/@2x//'`; echo $j; mv "$i" "$j"; done | |
# hyphen to underscore | |
for i in *; do j=`echo $i | sed 's/-/_/g'`; echo $j; mv "$i" "$j"; done | |
# or space to underscore | |
for i in *; do j=`echo $i | sed 's/ /_/g'`; echo $j; mv "$i" "$j"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment