Grep : get all file that doesn't have a line that matches
Use the "-L" option in order to have file WITHOUT the pattern. Per the man page:
-L, --files-without-match
Suppress normal output; instead print the name of each input file from which no output would normally have been printed. The scanning will stop on the first match.
Grep returns 0/1 to indicate if there was a match, so you can do something like this:
for f in *.txt; do
if ! grep -q "some expression" $f; then
echo $f
fi
done
EDIT: You can also use the -L option:
grep -L "some expression" *