Just another problem

Cisco – Formatação de ‘sh ip eigrp topology’ usando awk

Posted in cisco by Adriano on 07/03/2010

awk ‘{ while(getline > 0){ if($0~/successors/) {printf(“\n%-25s”, substr($2,1,length($2)-1) )}; if($0~/via/) {printf(“%-16s”,$2)} } }’ file.txt

10.10.155.0/24         10.15.50.5     10.15.50.6
10.11.182.11/32        Redistributed
10.11.76.241/32        Redistributed
10.11.191.4/30         Redistributed
10.11.184.0/24         Redistributed
10.10.145.0/24         10.15.50.5     10.15.50.6
10.11.191.8/30         Redistributed
10.11.183.0/24         Redistributed
10.10.146.0/24         10.15.50.5     10.15.50.6
10.11.68.240/28        Redistributed
10.11.182.2/32         Redistributed

Deixe um comentário