本帖最后由 zm900612 于 2011-4-26 23:45 编辑
小吹一下,我发现我貌似在算法方面小有天赋...- @echo off&setlocal enabledelayedexpansion
- findstr /n .* 1.txt >2.txt
- set "str=[0-9][0-9][0-9][0-9]"
- (for /l %%a in (1 1 4) do (
- for /f "tokens=1* delims=:" %%b in ('findstr "^^!str!:" 2.txt^|sort /r') do echo %%c
- set str=!str:*]=!
- ))>b.txt
- pause
复制代码
|