您的位置:首页 > 其它

use expect to input password automatically

2013-02-21 11:51 183 查看
#!/usr/local/bin/expect -f

puts $argv

set fl [lindex $argv 0]

set pw [lindex $argv 1]

spawn scp $fl $REMOET_SERVER:$PATH

expect "*password:"

#following $pw is carriage return

send "$pw

"

expect eof
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: