Robin Norwood writes:
> Samuel Brown <[EMAIL PROTECTED]> writes:
> > Hi ya,
> >
> > 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.
[...]
> First, I hope I'm understanding you correctly - you have this file, in
> 'some order', which you need to sort by month, then by date, then
> time, then bytce size.  If that's not right, please enlighten me.  If
> I understand your problem, however, read on -
[...]
> Bad news: it's not going to work for you, because it's going to curl
> up and die when it tries to load a GB file into RAM, copy it, sort it,
> and spit out another copy.
[...]

What other approaches might be possible? The first that comes to mind for me 
is don't wait until you have a 1GB log file; if you do this on a daily 
basis.... My second thought is can you open the file, read one line at a 
time and then write these lines to one of several smaller files based on 
the first sort criteria; thereafter then finish sorting the sub-files?

-- 
Kevin Pfeiffer <[EMAIL PROTECTED]> - www.iu-bremen.de



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

Reply via email to