TCL me Elmo

page 47 --

Brian,

It's disingenuous to say "By using procedures witihn TCL it allows you to re-run your ping test..." You are implying that once you paste it in, you can run the procedure again later. It's true, as long as you don't exit the tclsh [:(]

You are aware that we do need to exit the tclsh to contine the lab, right?

This issue was brought up in version 4.0 and it is in the archives....http://ieoc.com/forums/p/827/2645.aspx#2645

Comments

  • Bam,

    There are a few IOS commands that will not work while in the tcl shell - however I do find that it takes little time to construct the shell script in Notepad so I can paste it to all routers. Then I can reapply the tcl script if I do need to exit the tcl shell.

    With a little cut-and-past the tcl script can be copied to another Notepad window and converted to a macro to run on the switches - the switch macro can be left on the switch without interfering with other IOS commands.

    Darrell

  • Thanks Darrell --I think you missed my point -- I'm not comenting on the idea of cut-n-paste to get the script in the routers. The issue is whether it's useful to define a full procedure vs. just the foreach{} command.

    What's being offered in the workbook is the idea that one can simply rerun the procedure by typing the name of the procedure in tclsh. But what is not explained is that if you leave the tclsh (a necessity to complete the lab), the procedure is no longer available -- so it's back to cut-n-paste. So -- given that fact -- why waste time typing up a procedure? -- why not just do the 'foreach x {} {ping $x}'?

    Suggesting that people should spend valuable time on writing and running a procedure when a better solution is avaiable is not a very good "Strategy Tip".

  • Run the procedure.  Look for any issues.  Fix the issues.  Rerun the procedure.   What is the problem with that?

    Also how is adding an extra line or two to the script cause someone to waste valuable time?  If typing the extra lines causes you to fail the lab then you would have failed anyways [:P]

  • I see your point. 

Sign In or Register to comment.