
CODE: [Copy to clipboard][ Last edited by pusofalse on 2008-8-14 at 10:25 PM ]@echo off
for /f "tokens=1* delims=:" %%a in ('findstr /n .* test.txt) do (
if "%%b" equ "void function1" set/a n+=1
if defined n set/a n+=1
echo.%%b
setlocal enabledelayedexpansion
if !n! equ 3 echo add1&echo add2&set n=
endlocal
)>>a.txt
start a.txt
pause>nul
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |