in reply to memory monster

Do a search on merge sort or look it up in a CS book. Basically, the technique involves sorting chunks of the file at a time, and then ... merging the results.

But RAM is cheap at the moment, and everybody loves to solve problems by throwing money at them =)

Philosophy can be made out of anything. Or less -- Jerry A. Fodor