Hi Jamie Dainton,
On Wednesday, August 02, 2000 at 9:32:56 PM you wrote:
>>> do you by any chance know of any txt editor which can remove identical lines?
>>> i have got a list of addresses which i joined from 5 other txts and it
>>> came to some 5000 k and about 4 identical lines of each
SL>> The GNU text utils would work wonders here.
SL>> type file | sort | uniq > file.new
SL>> Sort will put them all in order and then uniq will return only a single
SL>> occurance of any repeating line.
> It's time to get your copy of C++ or Pascal out. Ultraedit won't cut
> it and I've never used GNU text editing tools. I'll have a look into
> it, if I think it'll take less than an hour or three I'll have a go. Just
> please don't expect miracles. I'm usually reasonably busy.
Well, here's a piece of Perl code that does the same thing. Tell me if you
get the C++ version any shorter ;)
@lines = <>;
foreach $line (sort @lines) {
push (@uniquelines, $line) unless $seen{$line}++;
}
print @uniquelines;
Oliver Sturm
--
% ar m God
ar: God does not exist
--
Oliver Sturm / <[EMAIL PROTECTED]>
Key ID: 71D86996
Fingerprint: 8085 5C52 60B8 EFBD DAD0 78B8 CE7F 38D7 71D8 6996
--
--------------------------------------------------------------
View the TBUDL archive at http://tbudl.thebat.dutaint.com
To send a message to the list moderation team double click here:
<mailto:[EMAIL PROTECTED]>
To Unsubscribe from TBUDL, double click here and send the message:
<mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------
You are subscribed as : archive@jab.org