本帖最后由 CrLf 于 2014-8-7 17:43 编辑
简单暴力解,疯狂地 set:- @echo off&setlocal enabledelayedexpansion
- for /l %%a in (0 1 98) do set /a $%%a=%%a+1
-
- for /f "delims=" %%a in (a.txt) do (
- set "str=,%%a,"
- set "str=!str:,=,!"
- set "str=!str: =!"
- for %%b in (!str!) do for %%c in (!$%%b!) do (
- set "str=!str:~%%b,%%c,=~%%c,!"
- set "str=!str:,%%b,%%c~=,%%b~!"
- set "str=!str:,%%b,%%c,=,%%b~%%c,!"
- )
- echo !str:~1,-1!
- )
- pause
复制代码
|