本帖最后由 went 于 2020-3-23 19:41 编辑
- @echo off
- REM 一致: d.txt
- findstr /ixg:"a.txt" "b.txt" >"d.txt"
- REM a不含b: a-1.txt
- findstr /ivg:"a.txt" "b.txt" >"a-1.txt"
- REM b不含a: b-1.txt
- findstr /ivg:"b.txt" "a.txt" >"b-1.txt"
- REM 去重: c.txt
- (
- more d.txt
- more a-1.txt
- more b-1.txt
- ) >"c.txt"
- pause&exit
复制代码 txt和bat都存为ANSI编码 |