Run several commands at once
From Internetworkpro
You might ask yourself: "Why?" Imagine you want to alter the configuration but you know that if you will do so using the prompt you will lose connectivity. For example: changing an ACL.
You can do so using tclsh
First run tclsh:
Router#tclsh
Put the commands you want to run between the bracket signs {}:
Router(tcl)#set x {
+>conf t
+>int f0/0
+>ip addr 1.1.1.1 255.255.255.0
+>exit
+>exit
+>}
conf t
int f0/0
ip addr 1.1.1.1 255.255.255.0
exit
exit
Now execute the commands:
Router(tcl)#eval $x
Quit tclsh
Router(tcl)#tclq
Enjoy...

