From: Du, Jianbo (jdu@ebay.com)
Date: Thu Mar 08 2007 - 22:53:14 ART
It would be type error. Is it $1? why not $i? :)
Regards,
Jerry
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Elliott Reyes
Sent: Friday, March 09, 2007 9:44 AM
To: ccielab@groupstudy.com
Subject: IEWB Lab 1 Task 3.11 TCL Script
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
This archive was generated by hypermail 2.1.4 : Sun Apr 01 2007 - 06:35:50 ART