RE: IEWB Lab 1 Task 3.11 TCL Script

From: Digital Yemeni (digital-yemeni@hotmail.com)
Date: Thu Mar 08 2007 - 23:04:00 ART


First time i use "tclsh" but looking at your code from a programming
syntax-prespective i can safely say:

} { puts [ exec "ping $1" ] }

change it to;

> } { puts [ exec "ping $i" ] }

There is a difference between "I" and "i"

Best Regards,

Digital
------------------------------------------------------------------------------------------------------------------

***********************************************************************************
*.* You'll NEVER succeed as a "CCIE" until you LOVE Cisco MORE than your
sleep! *.*
***********************************************************************************
I've not slept for the past 5 years and I'm expected to be busy for the next
57 years + The 5 CCIEs preparation adds on that a bit. Therefore, please be
concise on your email. Thank you!

>From: "Elliott Reyes" <elliottreyes@adelphia.net>
>Reply-To: "Elliott Reyes" <elliottreyes@adelphia.net>
>To: <ccielab@groupstudy.com>
>Subject: IEWB Lab 1 Task 3.11 TCL Script
>Date: Thu, 8 Mar 2007 17:44:22 -0800
>
>New here to the TCL scripting,
>
>
>
>I added this script into R5
>
>
>
>tclsh
>
>proc ping-internal {} {
>
> foreach i {
>
> 150.1.1.1
>
> 150.1.2.2
>
> 150.1.3.3
>
> 150.1.4.4
>
> 150.1.5.5
>
> 150.1.6.6
>
> 150.1.7.7
>
> 150.1.8.8
>
> 150.1.10.10
>
> 183.1.0.3
>
> 183.1.0.4
>
> 183.1.0.5
>
> 183.1.123.1
>
> 183.1.123.2
>
> 183.1.123.3
>
> 183.1.17.1
>
> 183.1.17.7
>
> 183.1.28.2
>
> 183.1.45.4
>
> 183.1.45.5
>
> 183.1.46.4
>
> 183.1.46.6
>
> 183.1.105.5
>
> 183.1.105.10
>
> 183.1.6.6
>
> 183.1.107.7
>
> 183.1.107.10
>
> 192.10.1.10
>
> 204.12.1.3
>
> 54.1.1.6
>
> } { puts [ exec "ping $1" ] }
>
>}
>
>
>
>The only thing is when I try to run the script I get a error message.
>
>
>
>Rack1R5#tclsh
>
>Rack1R5(tcl)#ping-internal
>
>can't read "1": no such variable
>
>Rack1R5(tcl)#
>
>
>
>Did I do something wrong.
>
>
>
>
>
>Elliott
>
>_______________________________________________________________________
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sun Apr 01 2007 - 06:35:50 ART