Edit files using TCL
From Internetworkpro
I tested this using 12.4
First goto tclsh:
Router#tclsh
Now open the file. The w+ means that you will override the file.
Router(tcl)#set x [open "flash:a.txt" w+] file0
Now run the first command "set lst {", then paste the content of the file and finish with "}"
Router(tcl)#set lst {
+>no access-list 100
+>access-list 100 per ip any host 1.1.1.1
+>}
no access-list 100
access-list 100 per ip any host 1.1.1.1
Now write the file and close it
Router(tcl)#puts $x $lst Router(tcl)#close $x
Quit TCL
Router(tcl)#tclquit
Enjoy...

