摘要: 原文地址:expectspawn、linuxexpect用法小记作者:悟世使用expect实现自动登录的脚本,网上有很多,可是都没有一个明白的说明,初学者一般都是照抄、收藏。可是为什么要这么写却不知其然。本文用一个最短的例子说明脚本的原理。 脚本代码如下: ############################################## #!/usr/bin/expect set timeout 30 spawn ssh -l username 192.168.1.1 expect "password:" send "ispassr" int 阅读全文
posted @ 2013-07-05 05:48 spaceship9 阅读(481) 评论(0) 推荐(0) 编辑