Wednesday, September 30, 2020

IOS-XR Show Commands with Regex?

Hey all.

I have tried googling this and can't find an answer. And I refuse to believe you cannot do this with IOS-XR. So, if I wanted to pipe out any show command using the formal argument, and if the last number is a 0, 1 or a 2, it will output EVERYTHING that has that number within the include portion. It's best if i show an example as it's harder to explain. If I did the following:

sh run formal | i TenGigE0/5/0/1

...and I JUST wanted to see everything configured for that interface (IGMP, multicast, etc), it will spit out 0/5/0/1, 0/5/0/11, 0/5/0/12, 0/5/0/13..etc

I've tried using a $ at the end of it. I tried wrapping it in quotes. I tried combining both of them. I CANNOT figure out how to output just the one interface without the OS spitting out all of the other ones that match that include statement.

This has to exist, right? Can someone let me know how to do this? Thanks



No comments:

Post a Comment