How would I use sed to delete all lines in a text file that contain a specific string?
To get a inplace like result with grep you can do this:
grep
echo "$(grep -v "pattern" filename)" >filename