Skip to content

Instantly share code, notes, and snippets.

@cargowire
Created January 20, 2011 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cargowire/787875 to your computer and use it in GitHub Desktop.
Save cargowire/787875 to your computer and use it in GitHub Desktop.
List files within the arg1 folder that are not referenced in any content from files in arg2
# Simple find unreferenced filename script
# Argument 1 is a folder that contains files you are interested in. e.g. an images folder
# Argument 2 is a folder that contains the files to search within. e.g. a css folder
for pattern in `ls $1`; do
if ! grep -rq $pattern $2; then
echo $pattern;
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment