循环执行shell脚本

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shufac/article/details/70138966

/////////////////////////////////////////////////////////////////////////////////////////////////////循环执行shell脚本
#$language = "VBScript"
#$interface = "1.0"
crt.Screen.Synchronous = False 
Sub Main
set fs  = createobject("scripting.filesystemobject")
Set conf = crt.OpenSessionConfiguration("10.0.0.1")
Set tab = conf.ConnectInTab()
Dim logfile
logfile = "E:\ALFT\Log\ALFT_20170411145534.log"
crt.Session.LogFileName = logfile
crt.Session.Log false
DO While true
crt.Screen.WaitForString "root@LTE-GW:~#"
;暂停1秒钟
crt.sleep 1000
crt.Screen.Send AAAA
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send BBBB
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send CCCC
crt.Screen.WaitForString "root@LTE-GW:~#"
crt.Screen.Send DDDD
loop
crt.Screen.Synchronous = False
crt.Session.Log False
crt.Session.Disconnect
crt.quit
End Sub


借助终端工具SecuretCRT.exe

通过cmd命令执行这个shell脚本,mySystem(ini_securecrtPath,_T("/script Log/alft.vbs"),2);



猜你喜欢

转载自blog.csdn.net/shufac/article/details/70138966