- @echo off & rem 为了防止特殊符号(! ^ &等)的影响不能用变量延迟而且最后的变量只能是%%a等形式输出
- for /f "tokens=1* delims=:" %%i in (' findstr /n "03-16.*17:.*:.*(61770)" a.txt ') do ( set /a number=%%i+1 & call :output )
- exit
- :output
- for /f "tokens=1* delims=:" %%a in (' findstr /n ".*" a.txt ') do ( if %%a == %number% (echo %%j & echo %%b & echo. ) )
复制代码
|