联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%i in ('findstr /n /c:"( )" a.txt') do ( set /a num=%%i+1 call :p %%i set qus=%%j call set qus=!qus:( =(%%ans%%! echo !qus!>>ans.txt ) pause goto :EOF :p for /f "tokens=1* delims=:、" %%a in ('more a.txt +%1 ^| findstr /c:"答案:、"') do ( set ans=%%b goto :EOF ) goto :EOF
标题请尽量表意(明确)、清晰,能大概反映帖子内容 能大概反映帖子(内容),而不要使用诸如"请帮忙
Originally posted by dikex at 2008-11-2 09:31 PM: [code] @echo off setlocal enabledelayedexpansion for /f "tokens=1* delims=:" %%i in ('findstr /n "( )" a.txt') do ( set /a num=%%i+1 call :p %%i set qus=%%j call set ...