Quote:
Originally Posted by ravikirankethe
Can you please explain your statement. By looking at that, it is complex to understand.
/35=D/{...}
If the line contains the pattern
35=D then execute the commands within the paranthesis.
N
get the next line and append it to the pattern space
/11=/{..}
If the pattern space contains the pattern
11= then execute the commands within the paranthesis.
s/^\([^ ]*\).*\n.*\(11=[^^]*\).*$/\1 \2/p
What we need in the first line is
"09:30:04,438" which is separated from next word by space. This string is matched by
\([^ ]*\). The next string is matched by
\(11=[^^]*\) which is separated from the next field by
^.