I have not idea how I would accomplish this. I have a script that scans for CDP neighbours. I get the results in a file. I am interested in CDP Neighbor Details if name BSWITCH shows up. If BSWITCH is not present then skip.
CDP Neighbor Details for 10.200.21.1
--------------------------------------------------------------------------------------------
Neighbor IP Name Interface Type |
--------------------------------------------------------------------------------------------
10.202.255.142 Bed inpath0_0 250
10.200.21.180 BSWITCH GigabitEthernet0/1 cisco WS-C2960-8TC-L
10.200.21.241 BSWITCH1 GigabitEthernet0/1 cisco WS-C2960-48TT-L
10.201.242.1 core Tunnel20 cisco ASR1004
I would like the results to read.
CDP Neighbor Details for 10.200.21.1
--------------------------------------------------------------------------------------------
Neighbor IP Name Interface Type |
--------------------------------------------------------------------------------------------
10.200.21.180 BSWITCH GigabitEthernet0/1 cisco WS-C2960-8TC-L
10.200.21.241 BSWITCH1 GigabitEthernet0/1 cisco WS-C2960-48TT-L