发布时间:2016-04-26 09:56:59
[yangkai@localhost myshell]$ cat test_dh.exp #!/bin/bash/expect -fset ip 192.168.23.128set password 123456set timeout 3spawn ssh root@$ipexpect {"passw" {send "$password\r";exp_continue}#"de password: " {send "$password\r";exp_continue}"root@" {send "df -h /opt\r";exp_continue}}int.........【阅读全文】
发布时间:2016-04-26 09:53:03
定时推送mysql备份至备份中心,通过expect来实现,结果在执行脚本的时候报错问题一./scp_to_bkcenter.sh "wish_2015-06-07.sql"-bash: ./scp_to_bkcenter.sh: /usr/expect/bin/expect: bad interpreter: No such file or directory由提示可知/usr/expect/bin/expect不存在,表明没有安装expect安装参考:http://www.cn.........【阅读全文】