标签:style blog color ar div sp on c log
#!/usr/bin/expect set timeout 60 if {$argc != 3} { send "usage followed by src,dst,password" exit } set src [lindex $argv 0] set dst [lindex $argv 1] set passwd [lindex $argv 2] spawn scp $src $dst expect { "yes/no" { send "yes\n" exp_continue } "password:" { send "$passwd\n" } } expect eof
可能还有些情况不能handle
标签:style blog color ar div sp on c log
原文地址:http://www.cnblogs.com/briller/p/3986238.html