Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

de-duplication

Status
Not open for further replies.

doood

Technical User
Jun 18, 2001
13
GB
Please can someone tell me if it is possible to de-duplicate a text file
 
It's entirely possible, but we need more detail about the format of the text file, etc. before we can give a complete answer. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
What on earth do you mean?

Do you mean if you have a perl script that creates a document and then you want it not to do that?

Unless you are on a *nix machine where file case does matter, Windows won't let you have duplicate files of the same name in the same folder.

Could you please expand your query?

Thanks,
-Vic vic cherubini
krs-one@cnunited.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash
====
 
say, for example, I have a text file that reads:-

Fred Bloggs
123 Example Street

Fred Bloggs
123 Example Street

Would it be possible to delete one of the entries?
 
That would be possible by reading the file into an array and du-duping the array. The only problem would be if the name line was the same but the address line was different. Then you would end up with two address lines. If that's not a problem, we can give you an example of how to do it. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top