Greeting all! I could use some assistance please.
I've been searching for the best way to duplicate a line based on a variable in the next line.
Sample Data:
Nov 22 00:00:19 10.10.10.1 "%ASA-4-313005: No matching connection for ICMP error message: icmp src Outside:1.2.3.4 dst Inside:69.161.160.162 (type 3, code 2) on Outside interface. Original IP payload: <unknown>."
Nov 22 00:00:19 10.10.10.1 last message repeated 2 times
Nov 22 00:00:24 10.10.10.1 "%ASA-4-313005: No matching connection for ICMP error message: icmp src Outside:1.2.3.4 dst Inside:69.161.160.162 (type 3, code 2) on Outside interface. Original IP payload: <unknown>."
Nov 22 00:00:24 10.10.10.1 last message repeated 5 times
Nov 22 00:00:29 10.10.10.1 "%ASA-4-313005: No matching connection for ICMP error message: icmp src Outside:1.2.3.4 dst Inside:69.161.160.162 (type 3, code 2) on Outside interface. Original IP payload: <unknown>."
Nov 22 00:00:29 10.10.10.1 last message repeated 3 times
I want to duplicate the lines based on how many times the log reports it was was repeated. So in the above example, line 1 would be duplicated 2 times, line 3 would be duplicated 5 times and line 5 would be duplicated 3 times.
I'm at a loss how to accomplish my goal. Anyone have a suggestion?
Thanks