42. When you know the question you will understand the answer
OK I'm gonna get sued by Douglas Adams' estate now.
I'll even help out,
first you open the file... then you read it... then you use regular expressions to find and remove duplicates, then close the file and open it for writing and write the new text back, then close the file again.
this has been done many many times over... use <insert favourite search engine here> to find a script and modify it.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.