Create a gist now

Instantly share code, notes, and snippets.

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