Quote:
Originally Posted by rahulevince
I need to match string and new line in regular expression or something like split in expect command. Here is the example - command output - Notification value: 34 39 48 Notification value: 44 02 09 Notification value: 54 03 28
I need to extract the output that match after "value: " i.e only hexa-value and up to every lines until second byte in last line must be 03 and also extract first bit i.e 5 from 54
But if 03 is in second line than it should not consider that 03. It must match at the end of line in every output.
One more thing, the lines of output is not fixed, it can be 3 or 4 or 5 or more than that. That's why we need to match in the last line and second byte i.e 03.
Thanks in advance
|
Hello and welcome!
Please post the EXACT infile (in code tags), and post EXACTLY what you want to achieve (in code tags) from that infile.
Then please show us what you have tried this far, and why and where it fails.
With best regards,
HMW