[nsp] Reg Exp help please

Bruce Pinsky bep at whack.org
Tue Nov 18 15:14:14 EST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Devane wrote:
| hello,
|
|
|
| Is there a way to get a line count of output in IOS.
|
|
|
| Meaning, I would love to be able to run sh ip bgp regexp ^70. wc -l
|
|
|
| And find out how many UUnet routes I have... is there an easy way to do
| this?
|
| (Easier than setting up Zebra and capturing the tables and using Linux etc.)
|
|
|

In newer versions, you can redirect or tee the output to a URL.  That would
allow you to capture the output to a file on your *nix box and run wc-l
against the output.  Here is a sample:

R2#show ip route | redirect ?
~  ftp:    Uniform Resource Locator
~  nvram:  Uniform Resource Locator
~  rcp:    Uniform Resource Locator
~  tftp:   Uniform Resource Locator
~  unix:   Uniform Resource Locator

R2#show ip route | tee ?
~  /append  Copy and append output to URL (URLs supporting append operation
~           only)
~  ftp:     Uniform Resource Locator
~  nvram:   Uniform Resource Locator
~  rcp:     Uniform Resource Locator
~  tftp:    Uniform Resource Locator
~  unix:    Uniform Resource Locator

=========
bep

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (MingW32)

iD8DBQE/un2WE1XcgMgrtyYRAh5hAKCwAM9Jm3AErRUVW/ku2XPRiUKUnwCeIFSE
GaPL8HpcHAuzfjIrnLl3/xg=
=AyYM
-----END PGP SIGNATURE-----



More information about the cisco-nsp mailing list