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

NX-OS 'show" command filters - CDP Neighbors

Marcin Zgola
Enthusiast
Enthusiast

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
VIP Community Legend VIP Community Legend
VIP Community Legend

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.).

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers