idc878787 当前离线
一级士官
for_flr 当前离线
五级士官
@echo off cd /d "%~dp0" setlocal enabledelayedexpansion for /f "delims=" %%a in (1.txt) do ( set /a n+=1 set _!n!=%%a ) for /f "delims=" %%a in (2.txt) do ( for /l %%b in (1 1 3) do ( set /a m+=1 set #!m!=%%a ) ) for /l %%a in (1 1 %n%) do ( if defined #%%a ( echo;!_%%a!^|!#%%a! ) else ( echo;!_%%a! ) ) pause复制代码
TOP
went 当前离线
少校
@echo off & cd /d "%~dp0" set /a "a=3,n=0" ( for /f "usebackq delims=" %%i in ("文本1.txt") do ( call set /a "n+=1,1/(n%%%%3-1)" 2>nul || set /p "q=" set /p="%%i|"<nul & call echo %%q%% ) )<"文本2.txt" pause&exit复制代码
评分人数
我 是 中 国 人 哈 哈 ! # 213复制代码
#&cls&powershell -c "type '%~0'|out-string|iex"&pause>nul $txt1=gc 1.txt $txt2=gc 2.txt|%{$_;$_;$_} for($l=0;$l -le $txt1.count;$l++){write-host $txt1[$l] `| $txt2[$l]}复制代码
@echo off setlocal enabledelayedexpansion cd /d "%~dp0" set "s=delims=" for /f "delims=" %%a in (1.txt) do ( call :job %%a set /a n+=1 set /a mod=!n!%%3 if !mod! equ 0 ( set/a m+=1 set "s=skip=!m! delims=" ) ) pause exit /b :job set join= for /f "%s%" %%i in (2.txt) do ( echo;%1^|%%i set join=yes goto :eof ) if not "%join%"=="yes" echo;%1复制代码