免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2500 | 回复: 4
打印 上一主题 下一主题

expect问题? [复制链接]

论坛徽章:
2
荣誉会员
日期:2011-11-23 16:44:17拜羊年徽章
日期:2015-03-03 16:15:43
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-04-06 14:27 |只看该作者 |倒序浏览
我在host1上,在host2上 执行命令/home/test/aaaa 之后退出,使用expect如何编写? 使用test用户 口令也是test

论坛徽章:
0
2 [报告]
发表于 2010-04-06 15:27 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
2
荣誉会员
日期:2011-11-23 16:44:17拜羊年徽章
日期:2015-03-03 16:15:43
3 [报告]
发表于 2010-04-06 17:37 |只看该作者
./auto1
spawn ssh test@host2 /home/test/aaaa
Warning: No xauth data; using fake authentication data for X11 forwarding.
testpy007: !!!!!testpy007:/scr1:100%
testpy003: !!!!!testpy003:/scr1:98%
testpy008: !!!!!testpy008:/scr1:100%
testpy016: !!!!!testpy016:/scr1:100%
testpy013: !!!!!testpy013:/scr1:100%
testpy012: !!!!!testpy012:/scr1:100%
testpy023: !!!!!testpy023:/scr1:100%
testpy027: !!!!!testpy027:/scr1:98%
testpy025: !!!!!testpy025:/scr1:93%
testpy019: !!!!!testpy019:/scr1:100%
testpy001: !!!!!testpy001:/scr1:100%
send: spawn id exp4 not open
    while executing
"send "$passwd\r""
    (file "./auto1" line 5)

有点小错误,如何改呢?

论坛徽章:
2
荣誉会员
日期:2011-11-23 16:44:17拜羊年徽章
日期:2015-03-03 16:15:43
4 [报告]
发表于 2010-04-07 07:01 |只看该作者
高手帮我看看,是怎么回事哦?

论坛徽章:
2
荣誉会员
日期:2011-11-23 16:44:17拜羊年徽章
日期:2015-03-03 16:15:43
5 [报告]
发表于 2010-04-07 15:02 |只看该作者
回复 2# bubu600


    可以谢谢,出现的问题是系统问题。
另外我想问一下:执行时出现一下信息:
./auto1
spawn ssh test@host2 /home/test/aaaa
test@host2 's password:

testpy007: !!!!!testpy007:/scr1:100%
testpy003: !!!!!testpy003:/scr1:98%
testpy008: !!!!!testpy008:/scr1:100%
testpy016: !!!!!testpy016:/scr1:100%
testpy013: !!!!!testpy013:/scr1:100%
testpy012: !!!!!testpy012:/scr1:100%
testpy023: !!!!!testpy023:/scr1:100%
testpy027: !!!!!testpy027:/scr1:98%
testpy025: !!!!!testpy025:/scr1:93%
testpy019: !!!!!testpy019:/scr1:100%
testpy001: !!!!!testpy001:/scr1:100%
如何能屏蔽掉红色部分呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP