Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

(SO) Extract different rows from 2 text files: Simple! Just 'diff' them.

$
0
0

From SO: http://bit.ly/2hxSOJp

The OP over there has 2 files and want the different rows written to a 3rd file.

Simple:

diff (gc $file1) (gc $file2) -passthru | sc $file3


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>