[c-nsp] can I use | pipe line such as "| inc xxx" and regexp such as "regexp ^$" both , when I execute "show bgp "

Hello.Cisco cisco.csa at gmail.com
Thu Sep 23 12:12:40 EDT 2010


hey,Peter

      u r right,but in IOX-XR,it`s not comfortable. I tried and output
listed bellow:

RP/0/RP0/CPU0:xxxx#sh bgp regexp ^$
BGP router identifier x.x.255.240, local AS number 65142
BGP generic scan interval 60 secs
BGP table state: Active
Table ID: 0xe0000000
BGP main routing table version 1465064
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, S stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
*>i10.149.240.212/30  x.168.246.x                100      0 ?
* i                   x.168.246.x                100      0 ?
RP/0/RP0/CPU0:xxxx#sh bgp regexp ^$ ?
LINE  <cr>
RP/0/RP0/CPU0:xxxx#sh bgp regexp ^$ | Inc ?
LINE  <cr>
RP/0/RP0/CPU0:xxxx#sh bgp regexp ^$ | Inc /30
RP/0/RP0/CPU0:xxxx#


thank you




2010/9/23 Peter Rathlev <peter at rathlev.dk>

> On Thu, 2010-09-23 at 20:57 +0800, Hello.Cisco wrote:
> > can I  use | pipe line such as "| inc xxx" and regexp such as "regexp ^$"
> >  both ,when I execute "show bgp "  in crs-1
>
> I don't know about the CRS-1, but in regular IOS you can. You have to
> use the "quote-regexp" command though:
>
>  show ip bgp quote-regexp "_65412$" | include ^r
>
> Without the "quote-regexp" version, the CLI is unable to see when the
> regular expression stops, and considers the pipe a part of it.
>
> --
> Peter
>
>
>


More information about the cisco-nsp mailing list