Wired Intelligent Edge

last person joined: yesterday 

Bring performance and reliability to your network with the HPE Aruba Networking Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of your switching devices, and find ways to improve security across your network to bring together a mobile-first solution
Expand all | Collapse all

Switch CLI command modifiers

This thread has been viewed 10 times
  • 1.  Switch CLI command modifiers

    Posted Apr 13, 2020 12:56 PM

    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?



  • 2.  RE: Switch CLI command modifiers

    EMPLOYEE
    Posted Apr 13, 2020 01:34 PM

    Hi, I can see begin, exclude and include.

    Screenshot 2020-04-13 at 11.01.35 PM.png

    Thanks



  • 3.  RE: Switch CLI command modifiers

    Posted Apr 13, 2020 02:53 PM

    Thanks, that's helpful.



  • 4.  RE: Switch CLI command modifiers
    Best Answer

    MVP GURU
    Posted Apr 13, 2020 02:31 PM

    Hi 

     

     

     



  • 5.  RE: Switch CLI command modifiers

    Posted Apr 13, 2020 02:57 PM

    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!



  • 6.  RE: Switch CLI command modifiers

    MVP GURU
    Posted Apr 13, 2020 04:21 PM

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



  • 7.  RE: Switch CLI command modifiers

    Posted Apr 14, 2020 07:26 AM

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



  • 8.  RE: Switch CLI command modifiers
    Best Answer

    MVP GURU
    Posted Apr 21, 2020 07:08 PM

    Hey @

     

     



  • 9.  RE: Switch CLI command modifiers

    Posted Apr 22, 2020 07:42 AM

    Great! Thanks for the tip!! Appreciate it.