
CODE: [Copy to clipboard][ Last edited by abcd on 2008-3-28 at 02:37 AM ]sed "/^$\|^\[b\]/d" test.txt|sed "N;s/\(.*\)\n\(.*\)/\2\n\1/;G"
CODE: [Copy to clipboard]@echo off&setlocal enabledelayedexpansion
set num=0
set str1=
set str2=
for /f "tokens=*" %%i in ('findstr /v "^\[b\]" test.txt') do (
set /a num+=1,t=num%%2
if !t!==0 (
set str2=%%i
call,echo %%str2%%
call,echo %%str1%%
echo.
) else (
set str1=%%i
)
)
pause>nul
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |