cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
957
Views
0
Helpful
1
Replies

Cisco switches show filters - how to do AND

dal
Level 3
Level 3

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

Julio E. Moisa
VIP Alumni
VIP Alumni

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

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

View solution in original post

1 Reply 1

Julio E. Moisa
VIP Alumni
VIP Alumni

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

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<