05-10-2017 05:01 AM - edited 03-08-2019 10:31 AM
Hi.
I'm trying to filter some output from my switches.
For example, I want to show only switchports marked with TV, and are connected.
But how to do it?
If I write "show int status | inc TV|connected, it lists all connected ports, even if description is TV or not.
It seems that the | (pipe) is used as an OR expression. But what I need is an AND expression?
Can it be done?
Thanks.
Solved! Go to Solution.
05-10-2017 05:23 AM
Hi
Try with: show int status | i (.*TV.*connected) also please check the following link:
https://cciernstricks.com/cisco-pipe-command-examples-with-regular-expressions/
Please rate the comment if the question was answered or useful
:-)
05-10-2017 05:23 AM
Hi
Try with: show int status | i (.*TV.*connected) also please check the following link:
https://cciernstricks.com/cisco-pipe-command-examples-with-regular-expressions/
Please rate the comment if the question was answered or useful
:-)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide