Skip to content

Instantly share code, notes, and snippets.

@joshcanhelp
Created March 9, 2020 21:09
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 joshcanhelp/839ba258cc6ba46533cbec5886590ddc to your computer and use it in GitHub Desktop.
Save joshcanhelp/839ba258cc6ba46533cbec5886590ddc to your computer and use it in GitHub Desktop.
Deletes unused files
while IFS= read -r -d '' file
do
if grep -qr "$file" ../content/md
then echo "Keeping $file";
else rm "$file";
fi
done < <(find _images -type f -print0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment