Re: How I can match space once I do a show with filter

From: Tyson Scott (tscott@ipexpert.com)
Date: Tue Jun 24 2008 - 10:37:45 ART


When you use the pipe to parse the data you need to specify something
that is going to capture the exact lines you are looking for.

So
show vlan brief | incl ^1[ ]*default

That line would match the vlan 1 line specifically. But it will not
get the ports that are also in the vlan that don't show up on the
first line.

Now if you know that vlan 1 is the only vlan that has enough ports to
create a second line you can use

sh vlan brief | incl ^1[ ]*default|^[ ]+

But that will also match additional lines that begin with a space if
other vlans have a lot of ports in it.

If you learn more about regular expressions and the Linux command grep
you will learn a lot more about what you can do with the
include/exclude output.

On Tue, Jun 24, 2008 at 9:27 AM, ccie <ccie@just-horizon.com> wrote:
> Hi Experts,
>
>
>
> How I can match space once I do a show with filter? E.g.
>
>
>
> Show vlan brief
>
>
>
> I want to see just VLAN 1 and the ports in it
>
>
>
> 1 default active Fa0/7, Fa0/8, Fa0/9, Fa0/11
>
> Fa0/12, Fa0/13, Fa0/14,
> Fa0/15
>
> Fa0/16, Fa0/17, Fa0/18,
> Fa0/21
>
> Fa0/22, Gi0/1, Gi0/2
>
>
>
> Regards,
>
> Amin
>
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
>

-- 
Tyson Scott - CCIE #13513 R&S and Security
Technical Instructor - IPexpert, Inc.

Telephone: +1.810.326.1444 Fax: +1.810.454.0130 Mailto: tscott@ipexpert.com



This archive was generated by hypermail 2.1.4 : Tue Jul 01 2008 - 06:23:22 ART