xczxczxcz (Tα酱油路过)当前离线
中尉
@echo off &cd /d "%~dp0" powershell "(gc a.txt) -match ((gc b.txt) -join '|')|sc c.txt -force" pause复制代码
TOP
@echo off &cd /d "%~dp0" powershell "$B=(gc b.txt);((gc a.txt)|?{($_ -replace '-.*$') -in $B})|sc c.txt;" pause复制代码
gc a.txt,b.txt|group {$_ -replace '-.*$'}|?{$_.count -ge 2}|%{$_.group[0]}|sc c.txt复制代码