0

How would I use sed to delete all lines in a text file which do not contain a specific string?

sed '/pattern to match/d' ./infile

I used this command, but it deletes the lines MATCHING a specific pattern, but what I want is to delete the lines which DO NOT contain a specific pttern?

0 Answers0