Jump to content
Can't remember your login details? Read more... ×
Sign in to follow this  

Produce delta of two files

Recommended Posts

Hi all,


I'm currently stumped with this, at work we export some data daily with two files being produced: an export of all all data

and a delta export of the difference between the current and the previous export.


The export is in the form of a zip file with multiple csv files within it, the delta export is the same but with only the difference between the files

but it needs to be the same format as it's imported automatically in another companies system.


I've beem trying to write something up to produce the delta files so i can zip them up and send them off.


Can anyone think of any suguestions as to how to approach this?


Google is being very forth coming, so i thought i might rack your brains while i'm knocking something up.


FYI the system that this would run on is debian and as such shell or python would be best for it (perl too if someone is bored :) )

Share this post

Link to post
Share on other sites

Hmm that could work,


Was going to just take the data, sort then compare with an ass load of error checking thrown in.


As the files are produced by an external process i don't have much control over the data itself until its exported (in our system).

Share this post

Link to post
Share on other sites

Would rsync be of help?

Hmm i had not thought about that, the main constraint that i'm working with is that the files have to be finalized at multiple csv's within a standard zip file.


Can't even not have the column headings in the csv as the importing system throws away the first line of the file.


Although the WAY rsync works could be of use.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this