ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Compare text files and keep only the DIFFERENT lines?

<< < (2/3) > >>

David.P:
Thanks! Sounds as if this is the right thing for me -- only a little drawback for users like me that are spoiled by mouse and blinkenlights --> seems as if there is no GUI.

But thank you very much for the tip!

Cheers David.P

Merida:
+1 for Winmerge

David.P:
Yeah thanks -- but how am I supposed to do that in Winmerge? Have looked around all menus and options but can't seem to find a "select" or "keep only different lines" option.

cranioscopical:
Another, GUI-if-desired alternative might be Beyond Compare.
With it, you could load your files and merge the differences into one, which might satisfy your needs.

rjbull:
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.


--- ---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]>.

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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version