联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
CODE: [Copy to clipboard]for /f "tokens=1 delims=:" %%i in ('findstr /n "." x.txt') do @set tl=%%i set line=0 set j=0 for /l %%i in (1,+1,%tl%) do ( set /a line+=1 set /a j+=1 for /f "tokens=1,3* delims=:=" %%a in ('findstr /n . x.txt') do if %%a==!line! set "n=%%b" set Value!j!=!n! )
CODE: [Copy to clipboard]for /f "tokens=1 delims=:" %%i in ('findstr /n "." x.txt') do @set tl=%%i set j=0 for /l %%i in (1,+1,%tl%) do ( set /a j+=1 for /f "tokens=1,2* delims==" %%a in ('sed -n "!j!p" x.txt') do set "n=%%b" set Value!j!=!n! )