TCLSH and Macro Ping Test on Cisco Routers and Switches

This topic is to discuss the following lesson:

very useful… Thanks Rene !!

Hello Team,

I have access to a virtual Cisco lab and I tried the ping script, but when I enter TCL mode there is no foreach option. Does it depend on IOS version?

Capture112

Thank you.

Regards,

Hello Milan

When using the TCLSH configuration mode, the scripting commands do not appear in the context sensitive help using the “?”. Only the CLI commands will appear there, not the scripting commands. As you can see from my test below, the foreach command does not appear as a command, but is accepted as part of the script:

R1#tclsh
R1(tcl)#f?
format  fsck  

R1(tcl)#foreach address {
+>(tcl)#

I hope this has been helpful!

Laz

Thank you Laz for your time to replay, all is clear now :slight_smile:

1 Like