Search code examples
windowsshelldiffcomparecomm

Windows command to print only common lines in two or more files


Something like comm but for Windows (No, installing Cygwin just for this is not a good idea.) It will be great if it will allow compare more than 2 files at once. Example for 2 files:

File1:

foo1
foo2
foo3
bar

File2:

bar
foo2

Output:

foo2
bar

(or in reverse order). Whitespace not have to be ignored (but it can), it's already normalized.


Solution

  • CoreUtils for Windows