Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!nrl-cmf!ames!pasteur!ucbvax!hplabs!hpda!hpcuhc!hpsemc!gph From: gph@hpsemc.HP.COM (Paul Houtz) Newsgroups: comp.unix.questions Subject: Re: sorting and reversing lines of a file Message-ID: <810031@hpsemc.HP.COM> Date: 27 Jan 89 22:04:07 GMT References: <9056@burdvax.PRC.Unisys.COM> Organization: HP Technology Access Center, Cupertino, CA Lines: 14 gwyn@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?