How would I use sed to delete all lines in a text file that contain a specific string?
You can also use this:
grep -v 'pattern' filename
Here -v will print only other than your pattern (that means invert match).
-v