bestcom 当前离线
列兵
wanghan519 当前离线
二级士官
awk -F '|' 'NR==FNR{d[$0]=1;next}{if($1 in d){print}}' b.txt a.txt > c.txt复制代码
TOP
ShowCode 当前离线
VIP1
@echo off set "FileA=a.txt" set "FileB=b.txt" set "FileC=c.txt" cd /d "%~dp0" (for /f "tokens=1* delims=|" %%a in ('type "%FileA%"') do ( findstr /b /e "%%a" "%FileB%" >nul 2>&1 if not errorlevel 1 ( echo %%a^|%%b ) ))>"%FileC%"复制代码
qixiaobin0715 当前离线
大校
findstr /l /g:b.txt a.txt>c.txt复制代码
@echo off for /f "delims=" %%i in (b.txt) do set _"%%i"=true (for /f "tokens=1* delims=|" %%i in (a.txt) do ( if defined _"%%i" ( if "%%j"=="" ( echo,%%i ) else ( echo,%%i^|%%j ) ) ))>c.txt复制代码
aloha20200628 当前离线
上尉
W.w 当前离线