CLI filtering with | i *include*

Userlevel 3


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.

4 replies

Userlevel 2
Badge +1

sh log | i “3:4 ” 



Userlevel 6

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

show log | include “Port 3:4 “

Userlevel 2

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


Userlevel 3

All very helpful, thanks!