[ale] comparing files

Jim Philips jcphil at mindspring.com
Thu Jul 18 12:22:10 EDT 2002


You could use awk or PERL for the task and you could use either one on both 
platforms. I like awk for this kind of stuff, but I'm sure there are good 
arguments to be made for PERL. If you look at the full name for PERL, you'll 
see that it's also made for tasks like this: Practical Extraction and Report 
Language.

On Thursday 18 July 2002 11:58 am, ChangingLINKS.com wrote:
> ALE, 07-18-02 1145  index:projdoc
> I have 100 text files that are all about 100Kb in size. The data in the
> files is supposed to be sequential - however, in my haste to backup the
> files from a dying system, I copied repetitive data in some of them.
> I would like to:
>
> 1. Compare 100 text files in a directory
> 2. find strings *more than* 4-500 characters long that are duplicated
> between files
> 3. print a report showing the similar text and the file names in a file
> 4. delete strings from the newer file - and leave in the older one
> 5. write a few characters in newer file to show where the omission is
>
> Having done a little research, the closest programs that I can find do the
> opposite task (diff, diff3) and they do not have the ability to compare 100
> files. Anyone know of a program that can d00 this in Linux (or even Win)?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.






More information about the Ale mailing list