• 0

Remove all duplicates from text files. Only leave unique lines.


Question

Hi folks,

 

I am looking for a way to remove all duplicate lines from a text file.  If there are 2 or more of the same line I want both/all removed so that the final text file will just have the totally unique lines left.

 

As a bit of background to what we are doing:

 

We  import images and data relating to the images into a database.

We then import some different data into the same database that, using some reference numbers, is matched with the 1st set of data.

We export the amalgamated data and send it to another company.

Each week we import more of both set of data.

Each week we export this data, but only need to send the "new" data to the other company.

Not all data from week n will be exported in week n.  

 

I am currently running a find & replace (using Useful File Utilities) using week 1 export against week 2 export to see if it will actually work - we have 100,000+ lines to find & replace on(increasing each week).

 

I suppose the question is, if I merge week 1 and week 2 text files and sort into order, is there software/script that will copy totally unique lines to a new text file?

 

Thanks in advance for any help.

2 answers to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.