From: Steve Ohnmacht (gs.ohnmacht@gmail.com)
Date: Wed May 18 2005 - 13:48:38 GMT-3
Guess I'l take a crack at it... tclsh, to me is basically expect which
is based off of tcl. I had no idea you could do this on ciscos (very
cool). From looking at your script all you're doing is specifying a
foreach loop with a variable name of address ( you could name that
what ever you want) and calling on that variable in {ping $address}.
Do you remember where you put the spaces, looks like their really isnt
much room for errros in this particular script... As long as you
incorporate the the closing curly brace after your loop you should be
good...
HTH
On 5/18/05, ccie2be <ccie2be@nyc.rr.com> wrote:
> Hi guys,
>
> Being that I don't trust my memory, is basic tcl scripting documented
> anywhere on the Doc-cd?
>
> Also, I was playing around with tcl scripts yesterday and noticed some
> strange things.
>
> If I had a syntax error, for example, a needed space was needed or missing
> and as a result the script bombed, correcting the script didn't seem to
> help.
>
> What I had to do was exit tcl, re-enter tcl and re-enter the script from
> scratch. Is there a better way to go?
>
> I also noticed that having or missing spaces could cause problems. As I
> know zilch about tcl except for what's been posted on GS and some public
> write-ups from various lab prep vendors, could someone offer some guidelines
> on where spaces are required or forbidden in a basic ping script?
>
> The script I was using was similar to the following:
>
> tclsh
> foreach address {
> 158.7.1.1
> 158.7.123.1
> 150.7.1.1
> 158.7.26.2
> 158.7.123.2
> 150.7.2.2
> 158.7.38.3
> 158.7.37.3
> 158.7.123.3
> 158.7.0.3
> 150.7.3.3
> 192.10.7.4}{ping $address}
>
> In the above script, I would very appreciate if someone could point out
> where spaces belong or don't belong.
>
> TIA, Tim
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Fri Jun 03 2005 - 10:11:58 GMT-3