|
对比两个文本,删除a文本里含有b文本某行字符一行
比如b文本为
2345
78965
erty
hjkul
444
785
ghj
45678
a文本为
2345fghjyrf
2345-edfghj
ety56783
ghrffhfh456
4565467576767
78965fgrtyh
执行后得到文本应该为
ety56783
ghrffhfh456
4565467576767
- copy /y a.txt c.txt >nul
- for /f "delims=" %%a in (b.txt) do (type c.txt|find "%%a">nul&&(type c.txt|find /v "%%a")>temp.txt
- move /y temp.txt c.txt >nul 2>nul
- )
- exit /b
复制代码 |
|