How to delete from a text file, all lines that contain a specific string?

后端 未结 18 2382
生来不讨喜
生来不讨喜 2020-11-22 02:06

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

18条回答
  •  离开以前
    2020-11-22 02:42

    You can also use this:

     grep -v 'pattern' filename
    

    Here -v will print only other than your pattern (that means invert match).

提交回复
热议问题