WHY 当前离线
上校
type "2.txt" | findstr /bevlig:"1.txt">不同内容.txt type "1.txt" | findstr /bevlig:"2.txt">>不同内容.txt复制代码
TOP
PS C:\Users\WHY> cd E:\Test PS E:\Test> type 1.txt 1 2 3 PS E:\Test> type 2.txt 2 3 4 PS E:\Test> type 3.txt 3 4 5 PS E:\Test> $hash = @{}; PS E:\Test> dir 1.txt,2.txt,3.txt | %{ $arr = type $_ | sort -Unique; $arr | %{ $hash[$_]++ }} PS E:\Test> $hash.Keys | ?{ $hash[$_] -eq 1 } 5 1 PS E:\Test>