cisco parse show command

Posted by tintifaxx on Server Fault See other posts from Server Fault or by tintifaxx
Published on 2011-11-24T13:39:55Z Indexed on 2011/11/24 17:58 UTC
Read the original article Hit count: 139

Filed under:

I want to write a perl script which logs into cisco switches via telnet and parses the output of show mac-address-table. The problem is that different switches show me a different field layout.

The WS-C3548-XL shows the fields in the order

Destination Address Address Type VLAN Destination Port

while the C2960 shows it like

Vlan Mac Address Type Ports

is there a way to tell show to print the fields in a predefined order?

© Server Fault or respective owner

Related posts about cisco