RE: What am I doing wrong here tclsh?

From: Scott Vermillion (scott_ccie_list@it-ag.com)
Date: Tue Nov 27 2007 - 02:37:35 ART


Try this:

proc ping-int {} {
foreach i {
132.1.0.1
132.1.17.1
150.1.1.1
132.1.0.2
132.1.23.2
150.1.2.2
132.1.26.2
132.1.3.3
132.1.0.3
132.1.23.3
150.1.3.3
132.1.35.3
132.1.33.3
150.1.4.4
132.1.0.4
132.1.255.4
132.1.45.4
150.1.5.5
132.1.35.5
192.10.1.5
132.1.5.5
132.1.45.5
150.1.6.6
132.1.26.6
132.1.6.6
54.1.2.6
150.1.7.7
132.1.17.7
204.12.1.7
150.1.8.8
204.12.1.8
132.1.8.8
132.1.255.9
132.1.255.10} { puts [ exec "ping $i rep 2 sour lo0" ] }
}

I'm pretty new to these but it seems that you need to be mindful of spaces
when putting them together.

Regards,

Scott

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
advitar84@yahoo.com
Sent: Monday, November 26, 2007 10:21 PM
To: ccielab@groupstudy.com
Subject: What am I doing wrong here tclsh?

I am trying to get the tclsh ping script going to test my reachability

Rack1R1(tcl)#proc ping-int{}{
wrong # args: should be "proc name args body"
Rack1R1(tcl)#foreach i {
+>132.1.0.1
+>132.1.17.1
+>150.1.1.1
+>132.1.0.2
+>132.1.23.2
+>150.1.2.2
+>132.1.26.2
+>132.1.3.3
+>132.1.0.3
+>132.1.23.3
+>150.1.3.3
+>132.1.35.3
+>132.1.33.3
+>132.1.0.4
+>150.1.4.4
+>132.1.255.4
+>132.1.45.4
+>132.1.5.5
+>150.1.5.5
+>132.1.45.5
+>192.10.1.5
+>54.1.2.6
+>132.1.6.6
+>150.1.6.6
+>132.1.26.6
+>132.1.17.7
+>150.1.7.7
+>204.12.1.7
+>132.1.8.8
+>150.1.8.8
+>204.12.1.8
+>132.1.255.9
+>132.1.255.10
+>}{ puts [exec "ping $i"]}
extra characters after close-brace
Rack1R1(tcl)#}
invalid command name "}" ^
% Invalid input detected at '^' marker.

Rack1R1(tcl)#proc?
% Unrecognized command

Rack1R1#show ver
Cisco IOS Software, C2600 Software (C2600-ADVENTERPRISEK9-M), Version
12.4(17), RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Fri 07-Sep-07 16:05 by prod_rel_team

ROM: System Bootstrap, Version 12.2(7r) [cmong 7r], RELEASE SOFTWARE (fc1)

Rack1R1 uptime is 3 hours, 10 minutes
System returned to ROM by power-on
System image file is "flash:c2600-adventerprisek9-mz.124-17.bin"

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found
at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
          
If you require further assistance please contact us by sending email to
export@cisco.com.
          
Cisco 2610XM (MPC860P) processor (revision 1.0) with 127627K/3445K bytes of
memory.
Processor board ID JAD07040JL9
M860 processor: part number 5, mask 2
1 FastEthernet interface
2 Serial interfaces
32K bytes of NVRAM.
49152K bytes of processor board System flash (Read/Write)
          
Configuration register is 0x2102



This archive was generated by hypermail 2.1.4 : Sat Dec 01 2007 - 06:37:31 ART