The purpose of this awk file is to accept 2 patterns from the command line and extract sections that is between these 2 patterns. And I'm using this file to search for sections that in between [W] and [i], also [E] and [i]. Therefore, in command line, I set
I tried what you suggested and here are the errors I received:
gawk: warning: escape sequence `\[' treated as plain `['
gawk: warning: escape sequence `\]' treated as plain `]'
gawk: getpara.awk:1: each rule must have a pattern or an action part
Also, I think by doing
$0 ~ PATTERN1 || $0 ~ PATTERN2 { print }
it will only print out the line with [W] & [E] labels and ignore and information following the lines.