我有以下...
@ECHO OFF
setlocal EnableDelayedExpansion
for /f "skip=1" %%p in ('wmic cpu get loadpercentage') do @echo %%p
ECHO ...this worked
ECHO.
PAUSE
for /f "skip=1" %%p in ('wmic cpu get loadpercentage') do set cpu=%%p
ECHO cpu is %cpu%
ECHO ...this did not work
ECHO.
PAUSE
为什么我不能在变量 %cpu% 中设置数字它总是空白!