测试

#!/usr/bin/expect
spawn scp -P 33312 /home/hanlei/pxe/pxe7.sh hanlei@192.168.3.101:/home/hanlei/
expect {
"yes/no" {exp_send "yes\r";exp_continue}
"*password" {exp_send "han.com\r"}
}
expect eof

posted @ 2018-01-13 14:45  *奥特*  阅读(90)  评论(0编辑  收藏  举报