6行数据为一组,输出顺序为3 1 2 5 4 6,应该就是这个规律- @echo off
- set "num=0"
- for /f "delims=" %%i in (1.txt) do (
- set /a "num+=1"
- call set "line%%num%%=%%i"
- )
- (
- set /a a=3,b=1,c=2
- call :loop
- set /a a=5,b=4,c=6
- call :loop
- )>2.txt
- pause&exit
-
- :loop
- call echo %%line%a%%%
- call echo %%line%b%%%
- call echo %%line%c%%%
- set /a a+=6,b+=6,c+=6
- if %a% leq %num% goto :loop
复制代码
|