Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!cmcl2!dasys1!jpr From: jpr@dasys1.UUCP (Jean-Pierre Radley) Newsgroups: comp.unix.questions Subject: Re: Reversing a file? Message-ID: <10915@dasys1.UUCP> Date: 12 Oct 89 19:01:24 GMT References: Reply-To: jpr@dasys1.UUCP (Jean-Pierre Radley) Organization: TANGENT Lines: 17 In article (Skip Montanaro) writes: >Does somebody have an elegant shell script for reversing the lines of a >file? I've come up with the following short one: I don't think I made this up. Maybe I got it from Kernighan & Pike. But it does seem simpler than the answers I've seen posted to date, if you don't have 'tail -r', and if the file isn't too big (whatever that may be, but at some point awk runs out of space).