Re: getting creative with command output

From: Bryan Bartik <bbartik_at_ipexpert.com>
Date: Thu, 7 May 2009 12:23:07 -0600

Sure, use the pipe in your regex. You can even do more than one:

R2#sho int | inc proto|address|error
FastEthernet0/0 is up, line protocol is up
  Hardware is Gt96k FE, address is c201.14cc.0000 (bia c201.14cc.0000)
  Internet address is 150.50.12.2/24
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 output errors, 0 collisions, 1 interface resets
     0 unknown protocol drops
FastEthernet0/1 is administratively down, line protocol is down
  Hardware is Gt96k FE, address is c201.14cc.0001 (bia c201.14cc.0001)
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 output errors, 0 collisions, 0 interface resets
     0 unknown protocol drops

-hth

Bryan Bartik
CCIE #23707, CCNP
Sr. Support Engineer - IPexpert, Inc.
URL: http://www.IPexpert.com

On Thu, May 7, 2009 at 11:52 AM, <Charles.Henson_at_regions.com> wrote:

> All,
> I've been trying to play around with command outputs to get more
> efficient.
>
> sho ip in bri | ex un - for example
>
> 1. Can I ask for more than one row from an output? "show me all my
> interfaces AND show me the errors."
>
> So I would like to combine: "show interf | in proto" which give me an
> interface name and "show interf | in error" which shows counters so that I
> get back a line with my interface and a line below with the errors.
>
> Is this possible? I check this years archives. Do I need to dig deeper? Any
> links or documentation would be appreciated.
>
> Charles
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>
>
>
>

--
Blogs and organic groups at http://www.ccie.net
Received on Thu May 07 2009 - 12:23:07 ART

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:04:42 ART