sorting and reversing lines of a file
Frank Rahmani
fmr at cwi.nl
Mon Jan 30 08:51:17 AEST 1989
>
> In article <9056 at burdvax.PRC.Unisys.COM> lang at 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 at 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.
More information about the Comp.unix.questions
mailing list