And well it has not been going so well, to find files that contain text is easy
$grep -il text *.txtTo invert a grep search just add the option -v, that will be the non matching files?
$grep -ilv text *.txtWhat actually happens is it is searching line by line, and invariably the .txt file has more than one line that does not contain the 'text'.
What you actually want to do is find all the files that match (because that is easy) then print out a list of files omitting all the ones that match.
So here is a short ruby script to do just that:
I called the script ruby_find.rb
and call it using $ruby_find.rb text