Networking stuff | findings from experience…

Single post

Have you ever dreamt of a Text editor embedded in IOS ?

Have you ever tried to debug an EEM script once installed on an IOS router ?

Unless you are terribly smart or your script is very simple, you have to fix many things before the script runs smoothly and works as expected.

Each time you need to change a byte in the EEM script, you need to transfer the file again.
Because file transfer is not always a simple thing in a secured network, the following tip might save you time and energy.

Using IOS embedded Tcl interpreter, it is so easy to write a text file in your router file system :

R351#
R351#
R351#tclsh
R351(tcl)#
R351(tcl)#
R351(tcl)#set F [ open nvram:test w ] 
file0
R351(tcl)#puts $F {


  Hello World !!

 some special char ####
 @@@@ [
 []
 ]

 $az
 $mppo ***..??

and the final closing brace ...
}
R351(tcl)#
R351(tcl)#
R351(tcl)#tclquit
R351#
R351#more nvram:test


  Hello World !!

 some special char ####
 @@@@ [
 []
 ]

 $az
 $mppo ***..??

and the final closing brace ...


R351#
R351#

01 Jan 2015

There are no comments for Have you ever dreamt of a Text editor embedded in IOS ?

Laisser un commentaire

  • Google add

  • Commentaires récents

    • Latest Tweets

    • Archives