[ILUGC] Re: How to delete all the lines only if it matches two different patterns

  • From: Baskar Selvaraj <baskar@xxxxxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Thu, 17 Nov 2016 09:44:56 +0530


sed -e '/pattern1/{/pattern2/d;}' inputfile

will work. Also, there are options with awk/perl.

Billion thanks.  btw, if I match for 3 patterns, how should I construct it.

S. Baskar


_____________________________________
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: