首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

expect治理N多服务器

2012-08-17 
expect管理N多服务器一个很简单的例子,下次有机会慢慢扩展^_^#!/usr/bin/expectset timeout -1set host [l

expect管理N多服务器
一个很简单的例子,下次有机会慢慢扩展^_^

#!/usr/bin/expectset timeout -1set host [lindex $argv 0]set user [lindex $argv 1]set pass [lindex $argv 2]spawn telnet $hostexpect *login:send "$user\r"expect *asswordsend "$pass\r"expect *bude243send "ls -l > ls.out\r"send "exit\r"expect eof 

热点排行