cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
112
Views
0
Helpful
1
Replies
Highlighted
dal Participant
Participant

Cisco switches show filters - how to do AND

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
VIP Advisor

Hi

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

:-)

View solution in original post

1 REPLY 1
Highlighted
VIP Advisor

Hi

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

:-)

View solution in original post

CreatePlease to create content
Content for Community-Ad