Diffing file contents

Posted by PHeiberg on Super User See other posts from Super User or by PHeiberg
Published on 2010-06-11T13:33:48Z Indexed on 2010/06/11 13:43 UTC
Read the original article Hit count: 324

Filed under:
|

I have two plain text files, each file is containing a list of strings sorted alphabetically with one string per line. I want to diff the files and have an output of all strings that exist only in file2.

Preferabbly I want the operation to be possible without any 3rd party tools, or with a minimum of installations of tools that is "normal" to find in a windows command line environment, such as GNU Diffutils, Powershell, etc. The output should be in text form (file or as command line output).

Example:

File 1 contents:
A
C
D

File 2 contents:
A
B
C
E

Result wanted:
B
E

© Super User or respective owner

Related posts about Windows

Related posts about diff