/root/fivetrees.txtr"interact ##------------....">

当前位置:  操作系统/服务器>linux

except自动登录的几段代码分享

    来源: 互联网  发布时间:2014-10-13

    本文导语:  代码如下:#!/usr/bin/expect -fset timeout 30set host "192.168.1.198"spawn ssh $hostexpect_before "no)?" {send "yesr" }sleep 1expect "password:"send "123456r"expect "*#"send "echo my name is fivetrees > /root/fivetrees.txtr"interact ##---------------------------- 代码如下:[root@fivetrees ~...

代码如下:

#!/usr/bin/expect -f
set timeout 30
set host "192.168.1.198"
spawn ssh $host
expect_before "no)?" {
send "yesr" }
sleep 1
expect "password:"
send "123456r"
expect "*#"
send "echo my name is fivetrees > /root/fivetrees.txtr"
interact

##----------------------------

代码如下:

[root@fivetrees ~]# cat expect
#!/usr/bin/expect
for {set i 10} {$i

    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • java命名空间java.lang类exception的类成员方法: exception定义及介绍
  • 对于相同的Exception,如何分辨造成Exception的原因
  • java命名空间java.io接口objectstreamconstants的类成员方法: tc_exception定义及介绍
  • "B_FundMaster.java": Error #: 360 : unreported exception: java.lang.Exception; must be caught or declared to be thrown at line 6
  • java命名空间javax.lang.model.element枚举elementkind的类成员方法: exception_parameter定义及介绍
  • 怪怪的EXCEPTION声明
  • 请问a method能return an exception吗?能写个例子看看吗?
  • linux操作系统的异常类(exception)不支持标准c++?
  • exception-handler parameter表示什么?
  • unreported exception: java.lang.ClassNotFoundException
  • 请问java里能自己定义新的Exception吗?
  • Exception in thread "main"
  • 请问exception类中的方法printStackTrace()是做什么用的?
  • 如何将Exception.printStackTrace()显示出来的内容存到String变量中
  • 这个错误是什么原因Exception in thread "main" java.lang.NoClassDefFoundError:
  • Applet报错:Exception:java.lang.NullPointerException
  • java运行exception问题,急!!!
  • exception in thread main???
  • 关于运行JAVA exception in thread "mian"
  • 为什么会是:) Runtime Exception ,有些看不懂:(
  • 如何熟悉Exception的种类?完全通过学习API的document?




  • 特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3