All,
I am trying to parse the output of a router command with script. It works most of the time as this is the output format:
Code:
Mu650 11.230.132.112 Fa0/0.100 11.286.72.33 06 01BD 0F42 9124K
Fa0/0.100 11.286.72.33 Mu650 11.12.46.49 06 0FA6 01BB 5327K
Mu650 11.242.100.227 Fa0/0.101 11.286.72.12 06 05DF 056A 2008K
If the first column is too wide the router adds some non-printable characters and spaces:
Code:
Se0/0/0:0.1111
11.12.215.49 Fa0/0.100 11.243.112.100 06 1F4E 0954 10M
Se0/0/0:0.1111
11.242.100.149 Fa0/0.101 11.243.121.131 06 05DF 10CD 838K
Se0/0/0:0.1111
11.231.247.26 Fa0/0.100 11.243.122.145 06 1F91 0AE4 317K
I tried with SED to replace the CR/LF/spaces sequence but was unsuccesful so far. Instead of the above I want this:
Code:
Se0/0/0:0.1111 11.12.215.49 Fa0/0.100 11.243.112.100 06 1F4E 0954 10M
Se0/0/0:0.1111 11.242.100.149 Fa0/0.101 11.243.121.131 06 05DF 10CD 838K
Se0/0/0:0.1111 11.231.247.26 Fa0/0.100 11.243.122.145 06 1F91 0AE4 317K
Any ideas on how to accomplish this?
Thanks,
Phil