12-04-2012 01:36 PM
Hello All,
I have a Tcl file on 7600 that produces a file, and I would like to copy this file to a server using scp.
This is how the file looks like :
::cisco::eem::event_register_none maxrun 240
#::cisco::eem::event_register_timer cron cron_entry "*/5 * * * *" maxrun 240
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
array set arr_einfo [ event_reqinfo ] ;
if [ catch {cli_open} rc ] {
error $rc $errorInfo
} else {
array set clifd $rc
}
set filename "IOS7600.dat_12345" ;
set transfer "copy disk0:/" ; append transfer $filename ; append transfer " scp://username:password@ip:" ;
if [ catch {cli_exec $clifd(fd) $transfer} rc ] {
error $rc $errorInfo
}
if [ catch {cli_close $clifd(fd) $clifd(tty_id)} rc ] {
error $rc $errorInfo
}
The problem is that scp: hangs ! Could you please help me to work-around this ? What am I doing wrong ?
Many Thanks.
Kind Regards,
Nikos
12-04-2012 02:14 PM
An alternative would be to write an applet, like :
event timer cron name PUSH-CoPP cron-entry "*/5 * * * *" maxrun 240
to do the following command :
set transfer "copy disk0:/" ; append transfer $filename ; append transfer " scp://username:password@ip:" ;
but how can I provide the filename, I could use a regexp like :
*IOS7600*
and then answer the related to scp dialog using action statements.
Could you please help me with this please ?
Many Thanks.
Kind Regards,
Nikos
12-05-2012 05:51 AM
file prompt quiet ... works
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide