Wired Intelligent Edge (Campus Switching and Routing)

Upcoming community maintenance Oct. 27th through Oct. 29th
For more info click here
Reply
Highlighted
Regular Contributor II

Switch CLI command modifiers

I'm aware that you can you use | at the end of a 'show' command to add output modifiers, such as to filter on a VLAN, i.e., show interface status | include 500, to show the status of interfaces in VLAN 500. I'm curious to know more about the output modifiers and how they can be used, but I can't seem to find any reference to them in the documentation. They clearly don't work exactly the same as in the MASs, so it would be helpful to see a summary of them. Does such a thing exist?


Accepted Solutions
Highlighted
MVP Guru

Re: Switch CLI command modifiers

Hi 

 

 

 

View solution in original post

Highlighted
MVP Guru

Re: Switch CLI command modifiers

Hey @

 

 

View solution in original post


All Replies
Highlighted
Occasional Contributor II

Re: Switch CLI command modifiers

Hi, I can see begin, exclude and include.

Screenshot 2020-04-13 at 11.01.35 PM.png

Thanks

Highlighted
MVP Guru

Re: Switch CLI command modifiers

Hi 

 

 

 

View solution in original post

Highlighted
Regular Contributor II

Re: Switch CLI command modifiers

Thanks, that's helpful.

Highlighted
Regular Contributor II

Re: Switch CLI command modifiers

Yeah, I guess it is - I had just hoped for something a bit more than that. For example, I was wondering about the possibility of combining more than one expression in the filter - so , for example, if I wanted to look at only the interfaces in VLAN 500 with the status of Down, I could put both of those into the piped output, something like:

 

show interfaces status | include 500,Down

 

- but I guess that doesn't exist at present.

 

Thanks!

Highlighted
MVP Guru

Re: Switch CLI command modifiers


jkoelker@orcsd.org wrote: ...so , for example, if I wanted to look at only the interfaces in VLAN 500 with the status of Down

 It's not the same thing (because the command's output on which you apply the pattern matching differs)...but what's about trying with a simple:

 

show vlan 500 | include "Down"

 

 I think concatenated pipes is not supported so, at best, a way could be to use regular expressions (but it could be difficult to extrapolate what you're looking from the provided output).

Highlighted
Regular Contributor II

Re: Switch CLI command modifiers

Yes, that works - thanks for the tip. Guess I need to do a little more experimenting! Appreciate the input.

Highlighted
MVP Guru

Re: Switch CLI command modifiers

Hey @

 

 

View solution in original post

Highlighted
Regular Contributor II

Re: Switch CLI command modifiers

Great! Thanks for the tip!! Appreciate it.

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: