Skip to main content
7 events
when toggle format what by license comment
Apr 25, 2019 at 21:48 comment added user313992 @mtk the range operator can be negated in sed, so you could also write sed -n '/pat1/,/pat2/!p'.
Apr 25, 2019 at 21:44 comment added user313992 @mtk The {next} block is needed to work around a limitation / design bug in awk -- the fact the range (/pat1/,/pat2) is not a real expression, and cannot be negated or used in a conditional. That was fixed in perl, where you can do the obvious: perl -ne 'print unless /test1/../test2/'
Apr 25, 2019 at 14:32 comment added steeldriver @mtk I have added a brief explanation of the awk command
Apr 25, 2019 at 14:31 history edited steeldriver CC BY-SA 4.0
added brief explanation
Apr 25, 2019 at 13:00 review Low quality posts
Apr 25, 2019 at 13:03
Apr 25, 2019 at 12:59 comment added mtk tried the awk solution.. work perfectly. so the {next} block does what exactly? please elaborate
Apr 25, 2019 at 12:44 history answered steeldriver CC BY-SA 4.0