Re: What am I doing wrong here tclsh?

From: Eric Leung (eric.lwc@gmail.com)
Date: Tue Nov 27 2007 - 02:40:25 ART


the problem lies on the last line of your script " }{ puts [exec "ping
$i"]}"
put a space between " }{ " => " } { " ... Then it should work~!

2007/11/27, advitar84@yahoo.com <advitar84@yahoo.com>:
>
> 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
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



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