Skip to content

Instantly share code, notes, and snippets.

@justhamade
Created June 14, 2013 23:46
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 justhamade/5786117 to your computer and use it in GitHub Desktop.
Save justhamade/5786117 to your computer and use it in GitHub Desktop.
Find all strings that are not in any file in the current directory or its children
#!/bin/bash
FILE=find.txt
DIRECTORY=fmep
while read f; do
echo "Searching for $f"
line=$(find $DIRECTORY -type f -exec grep -Hn $f {} \;)
if [ -z "${line}" ]; then
echo "$f NOT FOUND"
fi
done < $FILE
string1
string2
string3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment