Re: IEWB Lab 1 Task 3.11 TCL Script

From: Greg Wendel (gwendel@gmail.com)
Date: Thu Mar 08 2007 - 23:15:50 ART


change the $1 to $i and try again.

On 3/8/07, Elliott Reyes <elliottreyes@adelphia.net> wrote:
>
> 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
>
>
>

-- 
Gregory Wendel
Springfield VA, 22153


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