I have a text file:
router1#sh ip blah blah | incl ---
Gi2/8 10.60.4.181 --- 10.60.123.175 11 0000 0000 355K
Gi2/8 10.60.83.28 --- 224.10.10.26 11 F9FF 3840 154K
Gi2/8 10.60.83.198 --- 224.10.10.26 11 0000 0000 84K
Gi2/8 10.60.83.198 --- 224.10.10.26 11 8E38 3840 77K
Gi2/8 10.60.81.133 --- 224.10.10.36 11 0000 0000 72K
Vl332 10.29.29.238 --- 10.60.125.75 06 1296 0016 50K
-------------------------------------------------------------------------------
router1#exit
asdfasdfasf
asfasdffffffff23234234
asdfasdfsf
wwwwwwwwwwe4534523452345345235 asdf
router2#sh ip blah blah | incl ---
Vl280 10.60.83.28 --- 224.10.10.26 11 F9FF 3840 212K
Vl280 10.60.83.198 --- 224.10.10.26 11 8E38 3840 135K
Vl280 10.60.83.198 --- 224.10.10.26 11 0000 0000 130K
Vl280 10.60.81.133 --- 224.10.10.36 11 0000 0000 130K
Vl280 10.60.82.173 --- 224.10.10.51 11 0000 0000 116K
Vl280 10.60.82.173 --- 224.10.10.51 11 E5DC 3840 52K
Vl280 10.60.83.1 --- 224.10.10.40 11 E350 3840 42K
-------------------------------------------------------------------------------
router2#exit
asdfasdfa
asdfjl;as3802384
crap blah blah
I basically want the following output:
router1#sh ip blah blah | incl ---
Gi2/8 10.60.4.181 --- 10.60.123.175 11 0000 0000 355K
Gi2/8 10.60.83.28 --- 224.10.10.26 11 F9FF 3840 154K
Gi2/8 10.60.83.198 --- 224.10.10.26 11 0000 0000 84K
Gi2/8 10.60.83.198 --- 224.10.10.26 11 8E38 3840 77K
Gi2/8 10.60.81.133 --- 224.10.10.36 11 0000 0000 72K
Vl332 10.29.29.238 --- 10.60.125.75 06 1296 0016 50K
-------------------------------------------------------------------------------
router2#sh ip blah blah | incl ---
Vl280 10.60.83.28 --- 224.10.10.26 11 F9FF 3840 212K
Vl280 10.60.83.198 --- 224.10.10.26 11 8E38 3840 135K
Vl280 10.60.83.198 --- 224.10.10.26 11 0000 0000 130K
Vl280 10.60.81.133 --- 224.10.10.36 11 0000 0000 130K
Vl280 10.60.82.173 --- 224.10.10.51 11 0000 0000 116K
Vl280 10.60.82.173 --- 224.10.10.51 11 E5DC 3840 52K
Vl280 10.60.83.1 --- 224.10.10.40 11 E350 3840 42K
-------------------------------------------------------------------------------
I'm more comfortable with bash and awk, but if its a ton easier in perl, I would like to know how to go about this.
Thanks