cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1786
Views
0
Helpful
1
Replies

NX-OS 'show" command filters - CDP Neighbors

Marcin Zgola
Level 4
Level 4

I have a problem with NX-OS and i am trying to initiate the following command to filter output of "show cdp nei det"

this is how i would done on 6500

show cdp nei det | grep Device |IPv4 Add|Cisco IOS Softw

I need this to work on NX-OS.. I noticed lots of features after "|" is there a nice document out there to help me understand and i assume do things better.

thanks

CCIE 18676
1 Reply 1

Marvin Rhoads
Hall of Fame
Hall of Fame

The configuration guide has a pretty extensive section on the use of regular expressions in the NX-OS cli.

Reference

For your particular example, the string:

show cdp nei det | egrep 'Device |IPv4 Add|Cisco IOS Softw'

...would work. Note that it excludes software for neighbors not running IOS (e.g. NX-OS etc.).

Review Cisco Networking for a $25 gift card