- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in (a.txt) do (
- if defined flog (
- call set .!m!=%%.!m!%% %%i
- set flog=
- ) else (
- set/a n+=1,m=n%%10
- set flog=g
- if !n! gtr 10 (call set .!m!=%%.!m!%% !n! %%i)else call set .!m!=!n!%%.!m!%% %%i
- ))
- for /l %%i in (1 1 10) do (
- set/a m=%%i%%10
- call echo %%.!m!%%
- )
- pause
复制代码
|