[nsp] interesting "|include regexp" behaviour

Stephen J. Wilcox steve at telecomplete.co.uk
Thu May 29 01:52:14 EDT 2003


Not at all, the bgp regexp command uses the full line as regexp (ie ignores the 
pipe '|')

try 

sh ip bgp q "^32765_" | i ^\*>

should work for you


On Wed, 28 May 2003, Mark E. Mallett wrote:

> 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/
> 



More information about the cisco-nsp mailing list