Compare-Object $(Get-Content e:\work\fr.txt) $(Get-Content e:\work\ro.txt) -includeequal

This command will execute a line-by-line comparison of the two files.

To get only lines in the first file, pipe the output to a where-object cmdlet:


Compare-Object $(Get-Content e:\work\fr.txt) $(Get-Content e:\work\ro.txt) | where-object { $_.SideIndicator -eq "<=" }

 

Advertisements