in reply to memory monster

Rather than re-inventing the wheel, why not use already written tools? Like 'sort', that comes with every *nix system? And if you're on Windows, there are *plenty* of aftermarket sort tools. See TUCOWS

'sort' supports multiple keys, so all you need to do is set up your key order for year, month, day, then time. You *may* need to munge the month into a number with a front end script, but log files should be written with sortable dates, to start with. '06/Apr/2001' is *wrong*. '2001/04/06' is correct.

Update: Seems that sort knows about abbreviated month names. See the -M option.

--Chris

e-mail jcwren