RE: how to create tcl script ping test?

From: Ice Fire (fire_ice@verizon.net)
Date: Thu Feb 09 2006 - 15:22:03 GMT-3


Guy --
You da man...

That's what it was.

Thanks

Ice Fire
-----Original Message-----
From: Guy Sherr [mailto:gsherr@gmail.com]
Sent: Thursday, February 09, 2006 1:17 PM
To: Ice Fire
Subject: Re: how to create tcl script ping test?

I have not yet begun to learn the tcl shell in the router, but
I do know the tcl shell under unix.

To work, you need "[" around the exec. So:

foreach address {
   192.168.1.1
} { puts [exec ping $address] }

Works in unix, should work in the router...

On Feb 9, 2006, at 12:42 PM, Ice Fire wrote:

> Guys I have a 12.4 router and this is what I get..
>
> R1(tcl)#foreach address {
> +>192.168.1.1
> +>} {puts {exec "ping address"}}
> exec "ping address"
>
> R1(tcl)#foreach address {
> +>192.168.1.1
> +>} {puts {exec "ping $address"}}
> exec "ping $address"
>
> What am I doing wrong?
>
> Thanks
>
> Ice Fire
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On
> Behalf Of
> Brent Foster
> Sent: Friday, February 03, 2006 9:57 AM
> To: Brent Foster; Popgeorgiev Nikolay; Chris Lewis
> Cc: Theerapol Boonnan; ccielab@groupstudy.com
> Subject: RE: how to create tcl script ping test?
>
> Nevermind, my router is 12.3, so old syntax must
> apply. It works.
>
> --Brent
>
> --- Brent Foster <jbrentfoster@yahoo.com> wrote:
>
>> When I try this on my router, it does not seem to be
>> working:
>>
>> router4#tclsh
>> +>foreach address {
>> +>172.16.20.1
>> +>172.16.30.1
>> +>} {puts {exec "ping $address"}
>> +>
>> +>
>>
>> Nothing happens! Anyone know what is wrong here?
>>
>> --- Popgeorgiev Nikolay
>> <nikolay.popgeorgiev@siemens.com> wrote:
>>
>>> Thanks Chris,
>>>
>>> You are right !
>>>
>>>
>>>
>>> Best,
>>> N.
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Chris Lewis [mailto:chrlewiscsco@gmail.com]
>>> Sent: Friday, February 03, 2006 4:10 PM
>>> To: Popgeorgiev Nikolay
>>> Cc: Theerapol Boonnan; ccielab@groupstudy.com
>>> Subject: Re: how to create tcl script ping test?
>>>
>>> Nick,
>>>
>>> That script worked well for me on 12.2 routers.
>> For
>>> some reason on
>>> 12.4routers (that will appear in the lab) it needs
>>> to be amended
>>> slightly to the
>>> following to display an output.
>>>
>>> tclsh
>>> foreach address {
>>> x.x.x.x
>>> y.y.y.y
>>> } {puts {exec "ping $address"}
>>>
>>> Chris
>>>
>>> On 2/3/06, Popgeorgiev Nikolay
>>> <nikolay.popgeorgiev@siemens.com> wrote:
>>>>
>>>> Theerapol,
>>>>
>>>> You can use this:
>>>>
>>>>
>>>> tclsh
>>>> foreach address {
>>>> x.x.x.x
>>>> y.y.y.y
>>>> } {ping $address rep2}
>>>>
>>>>
>>>> best,
>>>> Nick
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Theerapol Boonnan
>>> [mailto:theerab@net1.co.th]
>>>> Sent: Tuesday, January 31, 2006 5:07 AM
>>>> To: ccielab@groupstudy.com
>>>> Subject: how to create tcl script ping test?
>>>>
>>>> Anyone know about how to create tcl script for
>>> ping test? And can I use
>>>> this tcl script in lab exam?
>>>>
>>>>
>>>>
>>>> Theerapol
>>>>
>>>>
>>>
>>
> ______________________________________________________________________
> _
>>>> Subscription information may be found at:
>>>> http://www.groupstudy.com/list/CCIELab.html
>>>>
>>>>
>>>
>>
> ______________________________________________________________________
> _
>>>> Subscription information may be found at:
>>>> http://www.groupstudy.com/list/CCIELab.html
>>>
>>>
>>
> ______________________________________________________________________
> _
>>> Subscription information may be found at:
>>> http://www.groupstudy.com/list/CCIELab.html
>>>
>>>
>>
> ______________________________________________________________________
> _
>>> Subscription information may be found at:
>>> http://www.groupstudy.com/list/CCIELab.html
>>>
>>
>>
>> Brent Foster
>> jbrentfoster@yahoo.com
>>
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam
>> protection around
>> http://mail.yahoo.com
>>
>>
> ______________________________________________________________________
> _
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>
>
> Brent Foster
> jbrentfoster@yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ______________________________________________________________________
> _
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
> ______________________________________________________________________
> _
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Wed Mar 01 2006 - 11:28:17 GMT-3