@echo off ::gawk为第三方工具,需要下载 gawk "{a[$0]++;b[NR]=$0} END{for(i=1;i<=NR;i++)if(a[b[i]]==1)print b[i]}" test.txt>result.txt start result.txt复制代码