Created
June 14, 2013 23:46
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string1 | |
string2 | |
string3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment