Reputation:
I have list of a strings in a file and want grep to search for them in another file and print only the strings which were not found. Is it possible?
Upvotes: 2
Views: 460
Reputation: 781096
while read string
do
if ! grep -q "$string" "$other_file"
then echo "$string"
fi
done < "$file"
Upvotes: 1