- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in (a.txt) do (
- set /a m+=1
- set _!m!=%%i
- )
- set nn=0
- set mm=-1
- :sta
- set /a nn+=2
- set /a mm+=2
- if defined _%nn% echo.!_%nn%!
- if defined _%mm% echo.!_%mm%!
- if !nn! lss !m! goto sta
- pause
复制代码
|