欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V99方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 5911|回复: 0
收起左侧

[系统维护] xshell script抓取路由配置文件

[复制链接]
oppo 发表于 2014-11-10 20:21 | 显示全部楼层 |阅读模式
[tex=code]Sub Main
dim fso,fread,strline
set fso=createobject("scripting.filesystemobject")
set fread=fso.opentextfile("C:\dev\e\xae",1)
do until fread.atendofstream
   strline=fread.readline
   'wscript.echo strline '这里也仅仅是显示一行内容而已
   xsh.Session.LogFilePath = "c:\dev\e\route.log"
   xsh.Session.StartLog
   xsh.Screen.WaitForString "server ip or domain name ( 'q' to exit ):"
   xsh.Screen.Send strline
   xsh.Screen.Send VbCr
   xsh.Screen.WaitForString "Last Login:"
   xsh.Session.Sleep 1000
   'xsh.Screen.Send "cat /etc/rc3.d/S27route"
   xsh.Screen.Send "cp /etc/rc3.d/S27route /tmp/route-"&strline&" && rsync /tmp/route-"&strline&" 10.217.13.242::hean/tmp/routecheck"
   xsh.Screen.Send VbCr
   xsh.Screen.Send "exit"
   xsh.Screen.Send VbCr
loop
fread.close
xsh.Session.StopLog
set fso=nothing

end Sub[/tex]

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-11-25 14:24 , Processed in 0.031389 second(s), 7 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表