
如何讀取log最后一行發(fā)現(xiàn)fail字段命令窗不關(guān)閉pass關(guān)閉命令窗RT:
這樣子寫會打開兩個(gè)窗口 可以只打開一個(gè)么?然后想要判斷一下抓到log最后一行的結(jié)果 如果是pass 命令窗關(guān)閉. 如果fail, 窗口不要關(guān)閉nclick="copycode($('code0'));">復(fù)制代碼
- @echo off
- start cmd /c test.py
- timeout /t 28
- Powershell gc 'Logfilelog.txt' -readcount 0 -tail 1
- pause

