Well, basically you'd need to treat each file as an array of lines.
You'd need to do a array diff between the first with second array, and
then the second array with the first.


On Tue, 22 Feb 2005 14:50:54 -0800 (PST), martin <[EMAIL PROTECTED]> wrote:
> 
> Hello.
> 
> I'm looking to separate data from Two files to provide
> the difference.   Has anyone accomplished anything
> similar ?  what would be the best way to do it ?
> 
> Basically, The files are available as CSV and/or tab
> delimited
> 
> Data in One is:-
> 
> Field One = ID          Field Two = First Name  Field Three =
> Last Name       Field Four = Email address      Field Five =
> another code
> 0123456         John                    Williams                        
> [EMAIL PROTECTED]
> vsyter5793
> 
> I have  second list with a format of :-
> 
> Field One = First Name  Field Two = Last Name           Field
> Three = Email address
> John                            Williams                        [EMAIL 
> PROTECTED]
> 
> The order is different, and there may be more or less
> entries in either  One.
> 
> I would like to compare the First files Field Four
> (email address) against the Second files Field Three
> (email address).
> 
> If there is a match, export the file One's entire line
> to a new file, Three.
> If there is NO match, I would like to export the
> entire line to new file, Four
> 
> ie.
> 
> a)  email addresses in file One that are in file two,
> export the whole line from file One to file Three.
> b)  email addresses in file One that are NOT in file
> Two, export the whole line from file One to file Four.
> c)  email addresses in file Two that are not in file
> One, export the whole line from file Two to file Four.
> 
> This should give :-
> 
> 1)   A new File Three with email addresses in both
> files but with Five fields.
> 2)   A new file Four with email addresses NOT in
> either file, some with 3 fields, some with 5 fields.
> 
> I suppose it would be nice to adjust the part c) so
> they moved to the correct field location.
> 
> Any clue's, ideas, code,  pointers.
> 
> Regards....
> 
> 
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com
> --
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
> 
> 


-- 
Premshree Pillai
http://www.livejournal.com/users/premshree/
-- 
To unsubscribe from the list, just send an email to rebol-request
at rebol.com with unsubscribe as the subject.

Reply via email to