Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!sharkey!edsews!uunet!mcvax!fmr From: fmr@cwi.nl (Frank Rahmani) Newsgroups: comp.unix.questions Subject: Re: Re: sorting and reversing lines of a file Message-ID: <783@sering.cwi.nl> Date: 29 Jan 89 22:51:17 GMT References: <422@elan.UUCP> Organization: CWI, Amsterdam Lines: 17 > > In article <9056@burdvax.PRC.Unisys.COM> lang@pearl.PRC.Unisys.COM (Francois-Michel Lang) writes: >>I need utilities to do two things: >>(1) reverse the order of lines in a file >> but leave the lines themselves intact. you might consider: #! /bin/sh exec cat "$@" | exec tail -r I use this all the time to reverse my .newsrc as I read nearly all groups and would never see the last groups if I didn't start from the end once in a while. fmr@cwi.nl -- It is better never to have been born. But who among us has such luck? Maintainer's Motto: If we can't fix it, it ain't broke. These opinions are solely mine and in no way reflect those of my employer.