08-02-2013 07:39 AM - edited 03-03-2019 07:08 AM
Hello everyone,
Is there a way to filter IOS output (include/exclude/begin...) case insensitive?
Mario Pinho
08-02-2013 11:15 AM
Hi Mario,
not really.
You can use patterns like [Vv]lan, (VLAN|vlan) or [Vv][Ll][Aa][Nn] but that's not handy at all, is it?
Are you looking for something special?
Best regards
Rolf
08-02-2013 05:06 PM
Hi Fischer,
Thank you. I have considered these and they come in handy in some command outputs where first letter can be capitalized.
I'm not looking for something in particular but full case insensitive searching for user inserted commands like ACL names, descriptions, route-maps, etc. While we do try to maintin rules (all small caps for example) sometimes they are not respected. With case insensitive search I can just put the word and see results instead of having to think of combinations or having to copy text to notepad++ and do a search there.
SecureCRT also helps with its search feature but that gets out of hand in a long session
08-03-2013 01:00 AM
Hi Mario,
I see. I don't know any freeware software for such configuration compliance tasks.
If you want to have some kind of automation you could
A simple example:
R1#show int loop0 description
Interface Status Protocol Description
Lo0 up up TEST
R1#tclsh
R1(tcl)#puts [regexp {test} [exec "show int loop0 descr"]]
0
R1(tcl)#puts [regexp -nocase {test} [exec "show int loop0 descr"]]
1
R1(tcl)#tclquit
There's a section for EEM scripting, so if you want to create a custom command for your needs, you'll get help there.
Best regards
Rolf
10-25-2019 03:45 PM
MY VOTE
Does not exist, but really should! Cisco should add to IOS! Something like "show run | inc -i cellular" for example.
01-20-2023 04:53 PM
A -i option like grep uses would definitely be preferred, but for the case I was searching this topic for...
show running-config | include [Vv][Ll][Aa][Nn]
works just fine
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