fgrep or, equivalently,
grep -F. This will interpret the pattern as a fixed string.
You can also put that single string in a file (by itself) and use
grep -f filename to specify the file. You'll still need the
-F flag though.
man grep for other options; there are several that could be useful.
For various ways of delete a line matching a given pattern, please see https://stackoverflow.com/a/5413132/5419599.
Putting it together, one approach is:
- Put that line of text in a file by itself. Call it "patternfile".
grep -lrFf patternfile . > filelist
filelist to remove the line
for i in $(cat filelist) ; do grep -vf patternfile $i > temp && chmod --reference=$i temp && mv temp $i ; done
In step 2, the grep options are:
-l to list matching files;
-r to recurse into subdirectories;
-F to use a fixed string as a pattern to match;
-f to use the file
patternfile as the pattern to match; then of course
> filelist to make a file containing the list of matching files.
In step 4,
grep simply uses the
-v flag to print nonmatching lines, and then
chmod ensures you won't have permissions problems, and
mv puts the file back in place.
There may be better ways but I think this will suffice.
EDIT: If you're running this as root, and not all these files are owned by root, do the following revised version of step 4:
for i in $(cat filelist) ; do grep -vf patternfile $i > temp && chown --reference=$i temp && chmod --reference=$i temp && mv temp $i ; done
The original step 4 is fine if you are the owner of all the files.