本帖最后由 terse 于 2019-10-10 10:07 编辑
回复 6# jrx401 - @echo off & setlocal enabledelayedexpansion
- for /f "tokens=1*" %%i in ('findstr /ig:b.txt a.txt') do set #%%i=%%j
- (for /f %%i in ('type b.txt') do (
- for /f "tokens=1*" %%a in ("%%i !#%%i!") do (
- if #%%b == # (echo;%%a new) else echo;%%a %%b
- )
- ))>t.$
- move t.$ b.txt >nul
复制代码
|