Hi,
I'm trying to make TCL scrip to copy running config to tftp server but when I use date env I get error.
when I copy this text to tcl I get file is created but without any data
-------------------------------------------------------------------------
tclsh
set x [ open "flash:backmeupnow.tcl" w+]
set time [clock format [clock seconds] -format "%H%M%S"]
set ken { write mem
show run | redirect tftp://10.0.3.122/Routers_Config/S05-RW877W-.$time._v1.txt
}
puts $x $time $ken
close $x
tclquit
---------------------------------------------------------------------------------
if I remove the $time from puts It's create the file but when I run the TCL I get error
can't read "time": no such variable
while executing
"show run | redirect tftp://10.0.3.122/Routers_Config/S05-RW877W-.$time._v1.txt "
(file "backmeupnow.tcl" line 2)
Regards
Marwan Urabi