I have the following text in many files, standard Cisco switch stuff and I need to script something that will parse many text files and print if the command "spanning-tree guard root" is enabled on each interface. i.e. I want to search where is enabled, and return the file\interface in a print.
! interface FastEthernet1/0/3 switchport access vlan 300 switchport mode access switchport port-security maximum 130 switchport port-security switchport port-security aging time 2 switchport port-security aging type inactivity no logging event link-status speed 100 duplex full srr-queue bandwidth share 1 60 30 10 srr-queue bandwidth shape 3 0 0 0 mls qos trust device cisco-phone storm-control broadcast level pps 1k storm-control multicast level pps 2k storm-control action shutdown storm-control action trap spanning-tree portfast spanning-tree bpduguard enable spanning-tree guard root !
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |