regex - displaying paragraphs not containing a pattern using sed/egrep/awk -


i trying separate out paragraphs not containing keywords "validto" or "draft" , other paragraphs should displayed , though have sed/awk 1 liners awk -v rs= '/occurance: 1/' ystdef.txt sed '/./{h;$!d};x;/search/!d'

could not find negation of same , display paragraphs not containing pattern :

schedule p0015d24#ep_daily_1_p draft on runcycle simple1 07/31/2004,09/30/2006,02/10/2007 except runcycle calendar2 peatoff priority 0 : p0015d24#ep_ea012_bfr  p0015d24#ep_ea012_n  follows ep_ea012_bfr end  schedule p0015d24#ep_daily_2 on runcycle rule1 validto 10/02/2013 "freq=daily" except runcycle calendar2 peatoff except runcycle calendar3 ptdly except runcycle calendar5 tws85off except runcycle exclude   01/20/2007,02/10/2007,03/10/2007,04/21/2007,05/12/2007,06/09/2007,07/21/2007,08/11/2007,   12/23/2007,12/24/2007,12/31/2007,01/19/2008,02/09/2008,01/01/2009,02/07/2009,05/22/2009,   05/25/2009,07/02/2009,07/03/2009,07/04/2009,07/05/2009,09/04/2009,09/05/2009,09/07/2009,   12/24/2009,12/25/2009,01/01/2010,03/20/2010,04/10/2010,09/06/2010,06/11/2011,12/24/2012 @ 0400 carryforward follows p0015d24#peat_bkup_cye.@ follows p0015d24#peat_bkup_mnth.@ follows p0015d24#peat_bkup_sat.@ follows p0015d24#peat_bkup_satnov.@ follows p0015d24#peat_restr_post.@ follows p0015m00#peat_batch_done.@ follows p0015m00#peat_reboot.@ follows p0015d24#peat_bkup_post.unrestrict_fpr02 follows p0015d24#peat_bkup_post_s.switch_log follows p0015d24#peat_bkup_post_z.switch_log : p0015d24#ep_batch_dt end 

awk -v rs= '!/validto|draft/' file 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -