Samuel Brown wrote at Sat, 10 Aug 2002 00:07:34 +0200:

> I'm teaching myself Perl and I have a log file around 1GB that I need to sort 
> by month | date | time | byte size. So far I have parse the log for "bytes" 
> since this is all that I need but I can't get it to sort like I want.
> 
> Here is the Data I parsed for bytes but now I need to sort by month | date | 
> time | byte size.

As Robin allready told,
to sort 1 GB in RAM can be quite impossible and
as Kevin said there must be other ways.

I would try to split the files into the months
(I mean go through each line,
 parse it and get the month,
 and store the line in a file depending on the month).

If the files are still too big,
split them into the dates.

When they are small enough,
you can e.g. use Robins solution for each of the files
and after that they can be rejoined.


Best Wishes,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to