|
kalos
|
 |
« on: November 09, 2007, 07:24:27 AM » |
|
hello
I have two text files and I want to see which lines are duplicated in those files and which not
do you know any tool that is able to do that?
thanks
|
|
|
|
|
Logged
|
|
|
|
|
f0dder
|
 |
« Reply #1 on: November 09, 2007, 07:28:56 AM » |
|
There's several, including free and paid software. One of the favorite commercial offerings among fellow DonationCoder members seem to be Beyond Compare, which is a quite decent piece of software. The free WinMerge is also quite good.
|
|
|
|
|
Logged
|
 - carpe noctem
|
|
|
|
iphigenie
|
 |
« Reply #2 on: November 09, 2007, 07:31:36 AM » |
|
I tend to use winmerge when i just need a quick comparison tool like that. http://winmerge.org/If you need to do it often then there are many developent tools with that feature, but winmerge is open souce and should do the job
|
|
|
|
|
Logged
|
|
|
|
|
|
yksyks
|
 |
« Reply #3 on: November 09, 2007, 07:35:37 AM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
mrainey
|
 |
« Reply #4 on: November 09, 2007, 08:59:45 AM » |
|
I use UltraCompare Lite, which is built into UltraEdit.
|
|
|
|
|
Logged
|
|
|
|
|
nontroppo
|
 |
« Reply #5 on: November 09, 2007, 09:10:33 AM » |
|
Compare It! if you want to spend money (clearly best paid app IMO). Winmerge if you want to do it for free. Though I doubt most people care any more about INI files, I wrote an online INI diff tool ages ago (the issue being INI sections can move around without lines changing which most Diff tools fail to handle well): http://nontroppo.org/ini/
|
|
|
|
|
Logged
|
|
|
|
|
Armando
|
 |
« Reply #6 on: November 09, 2007, 07:19:06 PM » |
|
Beyond compare
|
|
|
|
|
Logged
|
"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it." Glenn Gould
|
|
|
|
nite_monkey
|
 |
« Reply #7 on: November 09, 2007, 08:47:45 PM » |
|
it's a more complicated way, but you can get an editor that numbers the lines, and just open the two text files at once, and goto the two lines and compare them.
|
|
|
|
|
Logged
|
[Insert really cool signature here]
|
|
|
|
Ralf Maximus
|
 |
« Reply #8 on: November 10, 2007, 12:15:30 AM » |
|
Even better, you could open the first file and select the first line of text. Go to the 2nd file and search for that text; make a note of where it appears (or not) in the document. Repeat for each line of the first file, then swap files and start over.
|
|
|
|
|
Logged
|
|
|
|
|
f0dder
|
 |
« Reply #9 on: November 10, 2007, 04:59:40 AM » |
|
Even better, you could open the first file and select the first line of text. Go to the 2nd file and search for that text; make a note of where it appears (or not) in the document. Repeat for each line of the first file, then swap files and start over.
...or you could use one of the compare apps, which are 1000x easier and better and faster 
|
|
|
|
|
Logged
|
 - carpe noctem
|
|
|
|
muntealb
|
 |
« Reply #10 on: November 10, 2007, 06:54:48 AM » |
|
The built-in compare module from PSPad (open source text editor) is in my opinion the best comparing tool for text files. It beats WinMerge from a usability point of view. You open File 1 in PSPad, then go to Tools>Text Differences>text Diff with this file>Browse and choose File 2. The lines that are different in the two files will be colored. Address : http://www.pspad.com/
|
|
|
|
« Last Edit: November 10, 2007, 06:56:39 AM by muntealb »
|
Logged
|
|
|
|
|
OGroeger
|
 |
« Reply #11 on: November 10, 2007, 07:06:35 AM » |
|
As far as i know all comparison tools don't compare each line of one file which each line of a second file. They all define a kind of compare context in which they compare. The most simple example of such a context is that you compare only line 10 in one file with the lines 5 to line 15 in the other file. As a matter of fact the tools make this more clever, but dependant on how different the files of Kalos are, they might give him not the results he wants. Btw. another comparison tool: ExamDiff
|
|
|
|
|
Logged
|
|
|
|
|
nontroppo
|
 |
« Reply #12 on: November 10, 2007, 07:24:51 AM » |
|
The reason I originally chose Compare It! "compared" to Beyond Compare / Ultracompare is that I found its heuristics to handle moved sections better (as well as better within-line comparison). One can also use Regex pre-parsing or input plugins prior to matching to improve matching efficiency.
|
|
|
|
|
Logged
|
|
|
|
|
f0dder
|
 |
« Reply #13 on: November 10, 2007, 08:36:19 AM » |
|
The reason I originally chose Compare It! "compared" to Beyond Compare / Ultracompare is that I found its heuristics to handle moved sections better (as well as better within-line comparison). One can also use Regex pre-parsing or input plugins prior to matching to improve matching efficiency.
That's nice to know 
|
|
|
|
|
Logged
|
 - carpe noctem
|
|
|
|
tinjaw
|
 |
« Reply #14 on: November 10, 2007, 08:56:21 AM » |
|
Hmm, Compare It! is on sale today. 25% off for 24 hours. I see v4 is in alpha testing.
So far they haven't answered the ICQ message I sent them. I don't see any upgrade pricing on their site. Is it a lifetime license?
|
|
|
|
« Last Edit: November 10, 2007, 09:06:15 AM by tinjaw »
|
Logged
|
|
|
|
|
Darwin
|
 |
« Reply #15 on: November 10, 2007, 09:44:07 AM » |
|
Found this by digging through their FAQ: The registration fee for a package including Compare It! and Synchronize It! is as low as US $29.
The registration fee includes:
Lifetime e-mail technical support 1 year of free upgrades Discounts for future upgrades
|
|
|
|
|
Logged
|
"Some people have a way with words, other people,... oh... have not way" - Steve Martin
|
|
|
|
Darwin
|
 |
« Reply #16 on: November 10, 2007, 10:15:18 AM » |
|
|
|
|
|
|
Logged
|
"Some people have a way with words, other people,... oh... have not way" - Steve Martin
|
|
|
|
tinjaw
|
 |
« Reply #17 on: November 10, 2007, 10:26:55 AM » |
|
I just chatted with the developer. Transcript attached. (summary is that DC discount is still active.) Conversation with 28837946
*Conversation with 28837946 on 11/10/2007 8:52:23 AM:* (08:52:50) *7825266:* Hello, I have a question about Compare It!.
------------------------------------------------------------------------
09:35 (09:38:13) *28837946:* Hello, (09:38:24) *28837946:* Are you there yet? 09:55 (09:57:28) *7825266:* hello (09:58:16) *7825266:* I don't see any upgrade pricing on your website. (09:58:26) *7825266:* Is it a lifetime license? 10:00 (10:03:36) *7825266:* #2) does Compare It! come with the functionality of Synchronise It!? (10:04:15) *7825266:* My interpretation is that it does, and that you can purchase the bundle if you wish to use Synchronize It on a second computer. (10:04:15) *28837946:* #2: no, features do not overlap in 2 programs 10:05 (10:05:18) *28837946:* if you purchase it now, you will have 1 year of free upgrades. Your version you can use as long as you want. (10:05:55) *28837946:* upgrade price is 40% of regular purchase (10:06:14) *7825266:* I have multiple computers, but it is only me that uses them. Am I allowed to install them on all my computers. For example I have two desktops and a laptop. (10:08:51) *28837946:* our license allow personal license to be used on 3 computers - typically home, work and laptop. If you need more - you will have to purchase additional licenses. But if this is your home computers, I think you can live with single personal license 10:10 (10:10:12) *7825266:* I am looking at Compare It! even though I have Beyond Compare already because of something a forum buddy of mine posted... (10:10:16) *7825266:* The reason I originally chose Compare It! "compared" to Beyond Compare / Ultracompare is that I found its heuristics to handle moved sections better (as well as better within-line comparison). One can also use Regex pre-parsing or input plugins prior to matching to improve matching efficiency. (10:10:30) *7825266:* Can you please elaborate? (10:12:09) *7825266:* I am busy with other projects today, and really don't have time to demo Compare It. However, with the 24hour sale and 30-day money-back I may purchase and then try it out for a few weeks. Is that acceptable? (10:14:25) *28837946:* In fact you can even work with trial during these weeks - trial is fully functional anyway. But you can purchase a license, it's just fine, refund will not be a problem. (10:14:59) *28837946:* When I last checked BC it wasn't able to find moved sections, did it change? 10:15 (10:15:26) *28837946:* BC has regexp feature too, a bit more easier to use then in ComapreIt (10:16:18) *7825266:* I must confess that I haven't used BC on anything but small files to date. (10:16:31) *28837946:* If you need smarter aligning, you can check latest beta of v4, it has automatch feature - when lines are aligned by some "key" portion of string (10:16:46) *7825266:* And I don't think I have had and large chunks moved. (10:17:24) *28837946:* Anyway, if you will have a question on how to use CompareIt more efficiently, you are always welcome. (10:17:35) *7825266:* OK, thank you. (10:17:49) *7825266:* May I post this conversation to the thread on DonationCoder.com? (10:18:01) *28837946:* sure, no problems. (10:18:12) *7825266:* thank you (10:18:18) *28837946:* I had some donationcoder discount, btw (10:19:08) *7825266:* Is it still available? If not, would you like to off it again? (10:19:29) *28837946:* DCODER coupon - 50% off. yes, it should work 10:20 (10:20:20) *7825266:* Thank you. I will remind the other members of this discount. That also means I can try the demo first and purchase with the discount coupon later. Thank you again. (10:20:26) *28837946:* Note that CompareIt alone does not cover BC features - you need Synchronize It! too. (10:20:40) *7825266:* Understood.
|
|
|
|
|
Logged
|
|
|
|
|
Darwin
|
 |
« Reply #18 on: November 10, 2007, 10:52:07 AM » |
|
Dang! Tinjaw - good work!
|
|
|
|
|
Logged
|
"Some people have a way with words, other people,... oh... have not way" - Steve Martin
|
|
|
|
direnc
|
 |
« Reply #19 on: November 19, 2007, 04:15:51 PM » |
|
The best diff app I have yet to see for text is the one that comes with Visual Slick Edit. I can't help but mention that Visual Slick Edit is one great editor for programmers.
|
|
|
|
|
Logged
|
|
|
|
|
iphigenie
|
 |
« Reply #20 on: November 19, 2007, 04:30:38 PM » |
|
I was about to post that I tend to use the diff tool that comes with slickedit. I am stuck about 4 versions back on slickedit though, such a great tool but quite pricey
|
|
|
|
|
Logged
|
|
|
|
|
f0dder
|
 |
« Reply #21 on: November 19, 2007, 06:38:15 PM » |
|
I fail to see why people think SlickEdit is such a great editor :-s It falls somewhere between IDE and Editor, I'd rather use a full-fledged IDE or a more lightweight editor. But perhaps I just fail to see it's glory 
|
|
|
|
|
Logged
|
 - carpe noctem
|
|
|
|
biosmonkey
|
 |
« Reply #22 on: November 20, 2007, 12:27:17 PM » |
|
OK I'll chime in with my 2 cents.
I use Slickedit 2007 (v12) on a daily basis, and have used it since v5. I also use Beyond Compare, especially in the past year while I have been working on some high-profile web applications.
Slickedit by itself is not a stellar IDE, because it attempts to be generic and as such cannot offer all of the bells and whistles of a dedicated IDE. (Take Flex Builder for example). But its real power comes in code manipulation and the macros you can write with its built in C-like language. I have written macros you wouldn't believe, as well as extending the editor itself with my own functions, forms, dialogs, and text filters (most of the editor's function is exposed in the included macro source). So I use Slickedit as a pure text editor in conjunction with whatever IDE I am working with (which is why detection of file changes is essential!). For quick coding, or when I need the code hinting, I will use the IDE, but when I want to really move text around, I go to SE.
But I will disagree with the other person regarding Diffzilla (slickedit's file diff tool). It is just too simple and, from my experience, awkward when handling UTF8 files. I gave up on it a long time ago when I discovered BC.
Beyond Compare has been an ABSOLUTE NECESSITY for my work ... I can't tell you how vital it has been when synchronizing hundreds of multilanguage utf8 files in several different code bases.
I cannot speak for Compare It as I have not tried it. But I will mention that some of the features it offers that BC currently does not have are possibly coming in BC3 (syntax highlighting, inline editing etc).
|
|
|
|
|
Logged
|
|
|
|
|
Tinman57
|
 |
« Reply #23 on: November 20, 2007, 08:29:17 PM » |
|
I have two freebies that I use for that. CSDiff and VData. Sorry, don't have the links. Google it. 
|
|
|
|
|
Logged
|
((((TINMAN))))
|
|
|
|
lanux128
|
 |
« Reply #24 on: November 20, 2007, 09:07:01 PM » |
|
or its freeware version.. 
|
|
|
|
|
Logged
|
|
|
|
|