From: Sean C (Upp_and_Upp@hotmail.com)
Date: Fri Nov 18 2005 - 17:02:38 GMT-3
I'd be curious to know if there is a way to do that, specifically, also. 
But remember, regular expressions work after the "show run |" command, so 
you can get creative with the | (that's the pipe sign) which stands for 
"or".  For example:
switch#show run | i interface | description
interface FastEthernet0/1
 description *** TEST ***
interface FastEthernet0/2
description *** TEST ***
interface FastEthernet0/3
description *** TEST ***
interface FastEthernet0/4
description *** TEST ***
interface FastEthernet0/5
description *** TEST ***
interface FastEthernet0/6
description *** TEST ***
interface FastEthernet0/7
description *** TEST ***
interface FastEthernet0/8
description *** TEST ***
HTH,
Sean
----- Original Message ----- 
From: "Adam Asay" <evilshortbus@yahoo.com>
To: <ccielab@groupstudy.com>
Sent: Friday, November 18, 2005 1:53 PM
Subject: Using | with a show command
> Is it possible to match on something in a show command, then get the line 
> above it?
>
>  I am trying to do a;
>
>      show run | include description test
>
>  then I would like the line one above this in the config which would be 
> the interface.
>
>  Does anyone know if this is possible with IOS.
>
>  Thanks
>  Adam
>
>
>
> ---------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Thu Dec 01 2005 - 09:12:07 GMT-3