循环执行shell脚本


/////////////////////////////////////////////////////////////////////////////////////////////////////循环执行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);



你可能感兴趣的:(C/C++)