Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Remove Duplicate Lines

by tstock (Curate)
on Sep 18, 2002 at 19:01 UTC ( #198965=note: print w/ replies, xml ) Need Help??


in reply to Remove Duplicate Lines

If this is a one time fix, you can use the unix commands 'sort' and 'uniq', like so:

sort db.txt | uniq > newfile.db
'sort' sorts the entries in db.txt, uniq then cuts out duplicates and the the '>' redirects the output to a new file name instead of the screen (STDOUT).

tstock


Comment on Re: Remove Duplicate Lines
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://198965]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-12-17 22:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (38 votes), past polls