回复 2# idwma
用了一些笨方法,算法是实现了我的要求,先复制,然后提取,在截取显示,
哈哈- @echo off
- title=每5秒刷新一次CPU温度
- mode con cols=40 lines=50&color 0c
- :loop
- COPY temp.txt temp1.txt >nul
- for /f "delims=" %%i in (temp1.txt) do (
- set lastLine=%%~i
- )
- echo %lastLine% >ok.txt
-
- for /f "tokens=2-26 delims= " %%a in (OK.txt) do (
- echo cpu: %%a %%x
- )
-
- del temp1.txt
- del ok.txt
-
- TIMEOUT /T 5 >nul
- goto loop
复制代码
|