[nsp] interesting "|include regexp" behaviour

George Boulescu george at roedu.net
Thu May 29 09:10:17 EDT 2003


You should use

show ip bgp quote-regexp "^32..." | include (stuff)

because the cli has no way to know if your "| include " is or not part of
the regexp.

So don't use show ip bgp regexp in combination with pipe commands.

> Probably everybody knows this already, but what the heck..
>
> I was attempting to do something like:
>
>   show ip bgp regexp ^32765_|include ^\*>
>
> on a 7200 (Version 12.1(5)T12) to find all selected routes for a
> particular neighbor.  No matter what regexp I tried, all routes were
> shown.  Even with something like
>
>   show ip bgp regexp ^32765_|include blahblahblah
>
> Evidently you can't use "include regexp" along with "show ip bgp
> regexp" -- I'm guessing that the compilation of the regexp uses static
> context and the compilation of one overrides the other.
>
> It was easy enough to do e.g.:
>
>   show ip bgp | include ^\*>.*( 32765 )
>
> once I knew it was necessary.  However I couldn't easily find anything
> that documented that you couldn't use "|include" with "show ip bgp
> regexp" -- not to mention the fact that the command is accepted.
>
> Just musing-
> mm
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> http://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>

-- 

George Boulescu
Senior Network Engineer
RoEduNet Bucharest NOC
CCAI, CCNA



More information about the cisco-nsp mailing list