sorting and reversing lines of a file

Paul Houtz gph at hpsemc.HP.COM
Sat Jan 28 08:04:07 AEST 1989


gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:

>	pr -n9 -t | sort +0nr -1 | cut -f2-
>
>Sorting isn't the most efficient way to do this task, but it's easy
>to implement this way.  If you have a LOT of file reversing to do,
>then probably a real software engineering task should be undertaken.
----------

Umm, please explain why sorting isn't the most eficient way to do
this.

Is there a rapid way to begin reading at the end of a file in Unix?
If not, then wouldn't a sort be just as fast as any other way?



More information about the Comp.unix.questions mailing list