2176
General Software Discussion / Re: Compare text files and keep only the DIFFERENT lines?
« Last post by rjbull on November 19, 2008, 09:08 AM »If I understand you (and the comm utility) correctly, I think you might want comm rather than diff. It's another non-GUI command-line tool ported originally from Unix.
You'd want the -3 switch, leaving only the lines that aren't common to both files. Usually, you have to sort the files first for this kind of utility to work as expected.
Available here: GNU utilities for Win32
Usage: comm [OPTION]... LEFT_FILE RIGHT_FILE
Compare sorted files LEFT_FILE and RIGHT_FILE line by line.
-1 suppress lines unique to left file
-2 suppress lines unique to right file
-3 suppress lines that appear in both files
--help display this help and exit
--version output version information and exit.
Report bugs to <[email protected]>.
Compare sorted files LEFT_FILE and RIGHT_FILE line by line.
-1 suppress lines unique to left file
-2 suppress lines unique to right file
-3 suppress lines that appear in both files
--help display this help and exit
--version output version information and exit.
Report bugs to <[email protected]>.
You'd want the -3 switch, leaving only the lines that aren't common to both files. Usually, you have to sort the files first for this kind of utility to work as expected.
Available here: GNU utilities for Win32

Recent Posts

