I agree with you Chaining exclude and include can be PITA. This is no real substitute for RegEx.
Original Message:
Sent: Sep 24, 2024 10:00 AM
From: Janis Falkenhagen
Subject: CLI include with multiple patterns
Hey,
thank you for that answer. Thats a workaround for sure.
But in all honesty: This cant be the "real" solution?
Why did we take a step back in the cli?
Comware Switches are easily able to filter output via regexes. And its a damn awesome and useful tool.
Original Message:
Sent: Apr 11, 2024 04:31 PM
From: jdb13
Subject: CLI include with multiple patterns
I know this is an old post but...
have you just tried |excluding all the stuff you dont want?...
example...
show vsf detail | exc Type | exc Model | exc Status | exc "ROM Version" | exc Uptime | exc "CPU Utilization" | exc "Memory Utilization" | exc "VSF Link 1" | exc "VSF Link 2"
Output would be Just the Mac address and serial number from above command
Hope this helps someone else!!
Original Message:
Sent: Jan 12, 2021 02:07 PM
From: RR52
Subject: CLI include with multiple patterns
Hello David,
Apparently, this command does not work.
According to tech-support, searching for multiple patterns is not supported from the same output.
This command "show lldp neighbor | include <PATTERN-STRING-1> | include <PATTERN-STRING-2>"
looks into two STDOUT.
STDOUT1 from the "show lldp" command, and STDOUT2, from the out of "include <PATTERN-STRING-1>"
I need it to REGEX two patterns from the same STDOUT1
I've requested this as a feature request. But who knows if this will go in.
Thank you for your response.
rickr
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s). It may contain confidential and privileged information, such as health information or trade secrets, that may be restricted from further use or disclosure by state and federal law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please immediately contact the sender by reply e-mail and destroy all copies of the original message. Thank you.
Original Message:
Sent: 1/9/2021 6:50:00 AM
From: parnassus
Subject: RE: CLI include with multiple patterns
Hi Rick, IIRC the chaining could be done this way (example):
show lldp neighbor | include <PATTERN-STRING-1> | include <PATTERN-STRING-2>
Reference (example): ArubaOS-CX 10.5 Command Line Interface Guide for Aruba 8320 8325 Switch Series (Edition 1 July 2020).
------------------------------
Davide Poletto
Original Message:
Sent: Jan 08, 2021 02:01 PM
From: Rick Rodriguez
Subject: CLI include with multiple patterns
Hello,
I'm currently using AOS-CX 10.5 on an Aruba 6300 and 6405.
I've been having problems trying "grep" for multiple patterns on a single command line.
For example, if I do a "show lldp neighbor | include '<pattern1>', 'pattern2'", it reports "Command not supported".
What is the correct syntax for the command line so you can include multiple patterns?
Thank you,
rickr
------------------------------
rickr
------------------------------