日期:2014-05-16 浏览次数:20548 次
#!/usr/local/bin/expect set timeout 30 spawn scp -P 22 -r root@192.*.*.*:/1 /home/ expect "Password:" send "10jqka\r" interact
[root@localhost work]# time test3.sh spawn scp -P 22 -r root@192.*.*.*:/1 /home/ root@192.168.0.153's password: scp: /1: No such file or directory real 0m32.417s user 0m0.006s sys 0m0.002s [root@localhost work]#