Skip to content

Instantly share code, notes, and snippets.

@jparise
Created February 5, 2013 04:54
Show Gist options
  • Save jparise/4712258 to your computer and use it in GitHub Desktop.
Save jparise/4712258 to your computer and use it in GitHub Desktop.
Find unused images in iOS projects
#!/bin/bash
for i in `find . -name "*.png" -o -name "*.jpg"`; do
file=`basename -s .jpg "$i" | xargs basename -s .png | xargs basename -s @2x`
result=`ack -i "$file"`
if [ -z "$result" ]; then
echo "$i"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment