Categories
Welcome Center
Education & Development
Cyber Security
Virtualization
General
Certification Preparation
Project Management
Posts
Groups
Training Resources
Infosec
IT & Security Bootcamps
Practice Exams
Security Awareness Training
About Us
Home
General
Off-Topic
Cisco IOS CLI RegEx
thomas_
So, apparently this is a thing? I was reading online yesterday and came across some documentation on Cisco's website talking about regular expressions you can use to filter through the command line's output. This was quite a bit more in depth than just adding
| include
or
| begin
followed by a word. You can follow those with regular expressions instead of just using words or letters.
Perhaps the thing I liked most about what I read was when you're at the "----more----" section you can use the / + - symbols to filter what would normally appear had you just pressed the spacebar. The forward slash followed by a search term will search through it for that phrase. The "plus" sign with a search phrase to only include lines with that search term and the "minus" sign followed by a phrase to only include lines that don't have that term.
I knew you could use regular expressions with Linux, but it surprised me to learn that you can use them in the IOS CLI. Any one know if this is present in only certain versions of IOS or if it's available in all of them?
Find more posts tagged with
Comments
networker050184
I don't think I could service without it! It's available in all versions as far as I know. Some behaviors are different moving between IOS and NX/XR though.
thomas_
It's such a useful thing I can't believe I hadn't heard of it before the other day. Even just a passing comment in the cert books would be good. Then again I guess if you don't know what regular expressions are then a comment about them probably wouldn't do much good.
Mooseboost
I don't think I could survive without them. We don't use a whole lot of Cisco, but we do have some Junipers with pretty massive configs (we provide VPN concentrators for some major content providers) and there is no way I could navigate without them.
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of