本帖最后由 foxJL 于 2013-10-8 17:28 编辑
不会怎么排序,练练手- @echo off&setlocal enabledelayedexpansion
- for /f "tokens=1* delims==" %%i in (a.txt) do (
- for %%k in (%%j) do (set /a n=1%%k%%100 && set !n!=$)
- set "a="
- set/p=%%i=<nul
- for /l %%m in (1,1,100) do (if !%%m!==$ (set a=!a!-%%m) else (set a=!a! )
- set %%m=)
- for %%o in (!a!) do (set s=%%o&set s=!s:~1,50!&set s=!s:-= !
- set s1=!s:~0,2!&set s2=!s:~-3!&set s1=!s1: =!&set s2=!s2: =!
- if not !s1! equ !s2! (set/p=!s1!-!s2! <nul) else (set/p=!s1! <nul)
- )
- echo.
- )
- pause>nul
复制代码
|