[mplspm]: In a sorted list [better]

Dion Almaer dion at almaer.com
Fri Mar 22 16:13:05 CST 2002


or sort -u file > new_file

D

> -----Original Message-----
> From: owner-mpls at pm.org [mailto:owner-mpls at pm.org]On Behalf Of Jeff
> Gleixner
> Sent: Friday, March 22, 2002 2:00 PM
> To: mpls at pm.org
> Subject: Re: [mplspm]: In a sorted list [better]
> 
> 
> > For
> > the curious, my bigger problem was to take all the words in a
> > 16 MB text
> > file (there was one word on each line) and remove all of the
> > duplicates. [...]
> 
> 
> Unless you need to use Perl for some specific reason (an
> assignment for class? :-), you could simply use Unix utilities
> already written to do what you need.
> 
> % sort < file > uniq -o new_file
> 
> It won't get any faster than that.. :-)
> 
> See ya
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards.
> http://movies.yahoo.com/
> 
> 
> --------------------------------------------------
> Minneapolis Perl Mongers mailing list
> 
> To unsubscribe, send mail to majordomo at pm.org
> with "unsubscribe mpls" in the body of the message.
> 


--------------------------------------------------
Minneapolis Perl Mongers mailing list

To unsubscribe, send mail to majordomo at pm.org
with "unsubscribe mpls" in the body of the message.



More information about the Mpls-pm mailing list