cancel
Showing results for 
Search instead for 
Did you mean: 

CLI filtering with | i *include*

CLI filtering with | i *include*

Keith9
Contributor III

Hello,

Silly question here… lets say I want to look through the switch logs for anything in an EXOS switch pertaining to a specific port, say 3:4 in this example, I do a sh log | i 3:4

How do I get it to NOT show me other related things like port 3:45 link states / or port 3:40-whatever ish, or even just because in a time stamp there's a 3:4 together.

 

I tried the following

sh log | i 3:4 (space) then (enter)

sh log | i “3:4”

It still shows every occurrence even when there's more characters before or after the string I’m piping to the i command.

1 ACCEPTED SOLUTION

OscarK
Extreme Employee

Just expand you filter a bit (mind the space after the port number between the quotes.. 

show log | include “Port 3:4 “

View solution in original post

4 REPLIES 4

Keith9
Contributor III

All very helpful, thanks!

yas1
New Contributor II

You can do some filtering with the grep command which supports some regex magic, too.

b037ea4fb081457ead627ae62ff0c62b_2095cb5e-88f0-4324-bc3c-e6c055d61fad.png

 

OscarK
Extreme Employee

Just expand you filter a bit (mind the space after the port number between the quotes.. 

show log | include “Port 3:4 “

dpanev
Contributor

sh log | i “3:4 ” 

 

Maybe?

GTM-P2G8KFN