Process multiline input with awk
Hello, I've been trying this and I'm stuck. I've tried to search for awk multiline record processing but all the examples I've seen use a blank line as the field seperator.
Given the following input:
Time: 131127 13:41:50
Query_time: 12.249749
Time: 131127 13:41:59
Query_time: 5.156203
Time: 131127 13:42:46
Query_time: 32.596008
Time: 131127 13:44:30
Query_time: 99.876977
Time: 131127 13:45:20
...
...
I want to extract fields 2 & 3 from the first line and field 2 from the second line, and repeat until EOF.
Can somebody suggest an approach as I'm at a loss.
Regards,
|