1

can awk patterns match multiple lines?

view story
linux-howto

http://stackoverflow.com – I have some complex log files that I need to write some tools to process them. I have been playing with awk but I am not sure if awk is the right tool for this. My log files are print outs of OSPF protocol decodes which contain a text log of the various protocol pkts and their contents with their various protocol fields identified with their values. I want to process these files and print out only certain lines of the log that pertain to specific pkts. Each pkt log can consist of a varying number of lines for that pkt's entry. awk seems to be able to process a single line that matches a patt (HowTos)