标签:desktop 文件路径 name send 连接 log文件 files mes class
;log文件路径 logFilePath="C:\Users\18430\Desktop\java\logfiles" ;登陆user USERNAME = ‘root‘ ;登陆密码 PASSWORD = ‘123456‘ ;连接登陆命令 COMMAND = ‘192.168.188.128‘ strconcat COMMAND ‘:22 /ssh /2 /auth=password /user=‘ strconcat COMMAND USERNAME strconcat COMMAND ‘ /passwd=‘ strconcat COMMAND PASSWORD ;连接
connect COMMAND wait ‘‘ ; ; PowerCycle with logging ; gettime timestr "%Y%m%d-%H%M%S" sprintf2 filename ‘%s\console_%s_%s.log‘ logFilePath USERNAME timestr logopen filename 0 0 step = 0 ;while 1 ; call show_step strconcat msg COMMAND strconcat msg ‘ login successfully ‘#13#10 logwrite msg sendln ‘cd /home‘ sendln ‘touch jjj.txt‘ wait ‘ ‘ ;pause 2 ;endwhile logclose end :show_step step = step + 1 gettime timestr sprintf2 str ‘[%d] %s‘ step timestr statusbox str ‘counter‘ return
标签:desktop 文件路径 name send 连接 log文件 files mes class
原文地址:https://www.cnblogs.com/yanweichen/p/11373702.html