Tcl编写循环执行某个任务的脚本

来源:互联网 发布:mac上的iphoto在哪儿 编辑:程序博客网 时间:2024/05/19 15:44

现在要执行设备执行20次某个人物,然后让设备强制重启,等待20分钟让设备重启完全启动,一直循环10000次,
查看任务在执行的时候会不会出现自己预期的现象:

for {set i 1} {$i < 10000} {incr i} {    tsend "\n"    for {set j 1} {$j < 20} {incr j} {        tsend "执行任务1"        after 2000        tsend "执行任务2"        after 2000    }    tsend "reboot force"    tsend "\n\n"    tsend " "    tsend "Y"    after 120000    tsend "\n\n"    tsend " "   }
1 0
原创粉丝点击