Just another problem

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

Publicado em cisco por Adriano em 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 uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Sair / Alterar )

Imagem do Twitter

You are commenting using your Twitter account. Sair / Alterar )

Foto do Facebook

You are commenting using your Facebook account. Sair / Alterar )

Connecting to %s

Seguir

Obtenha todo post novo entregue na sua caixa de entrada.