For instance, on a CME, if you want to display a particular ephone or
ephone-dn, you can use:
show run | s ephone 30
show run | s ephone-dn 30
what you have to realize is that the CME developers put two spaces between
the ephone/ephone-dn and the number. As well, the regular expressions are
case-sensitive so you have to watch out for that. If you're still doing a
'show run' you're a sucker. Get good with include and section commands and
you'll fly.
-nick
On Sat, Aug 14, 2010 at 9:19 PM, Kambiz Agahian <aussiecert_at_gmail.com>wrote:
> Guys,
>
> This sounds pretty cool but you can not use this as a general golden
> formula for everything.
>
> Please bear in mind that the output of some IOS commands may need some
> modifications in this string. In many cases even a single "space" in the
> output should be taken into consideration and can easily change the way you
> develop your regexp.
>
> Kambiz Agahian
>
> CCIE Instructor/Consultant
> M.Eng Telecom, CCIE# 25341, CCSI# 33326, MCSE, MCSA
>
>
>
>
>
> On Fri, Aug 13, 2010 at 1:21 AM, SIVA <siva0111_at_gmail.com> wrote:
>
>> This is really gr8 information.
>>
>> Siva
>> IT Analyst
>> TCS
>> 9553551054
>>
>>
>> On Fri, Aug 13, 2010 at 12:51 AM, Muzammil Malick <malickmuz_at_gmail.com
>> >wrote:
>>
>> > Thanks guys
>> >
>> > I had never seen the linenum command!
>> >
>> > On 12 August 2010 20:17, Nick Matthews <matthn_at_gmail.com> wrote:
>> > > True, mistake on my part. I just get so excited around regular
>> > expressions.
>> > >
>> > > If you really wanted to nickpick it would look like:
>> > > sh run linenum | include ( [1-5]?[0-9] : )
>> > >
>> > >
>> > > -nick
>> > >
>> > > On Thu, Aug 12, 2010 at 11:57 AM, Ryan West <rwest_at_zyedge.com> wrote:
>> > >>
>> > >> Nick,
>> > >>
>> > >> > -----Original Message-----
>> > >> > From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On
>> > >> > Behalf Of Nick Matthews
>> > >> > Sent: Thursday, August 12, 2010 11:37 AM
>> > >> >
>> > >> > This is a little more scalable:
>> > >> >
>> > >> > R1#sh run linenum | include ( [1-2] : )
>> > >> >
>> > >> > for example this would be 50 lines:
>> > >> >
>> > >> > R1#sh run linenum | include ( 5. : )
>> > >> >
>> > >>
>> > >> Not to nitpick too much, but the second example will show lines
>> 50-59,
>> > if
>> > >> you want to show 1-59 I think you would need an ? statement.
>> > >>
>> > >> sh run linenum | include ( [1-5]?. : )
>> > >>
>> > >> -ryan
>> >
>> >
>> > 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
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
Received on Sun Aug 15 2010 - 13:50:17 ART
This archive was generated by hypermail 2.2.0 : Wed Sep 01 2010 - 11:20:52 ART