Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!Anw%maths.nottingham.ac.uk@UCL-CS.ARPA
From: Anw%maths.nottingham.ac.uk@UCL-CS.ARPA
Newsgroups: net.unix
Subject: Re: reversing lines in a file
Message-ID: <1907@brl-tgr.ARPA>
Date: Fri, 4-Oct-85 19:58:46 EDT
Article-I.D.: brl-tgr.1907
Posted: Fri Oct  4 19:58:46 1985
Date-Received: Sun, 6-Oct-85 04:29:17 EDT
Sender: news@brl-tgr.ARPA
Lines: 14


		anw@UK.AC.Nott.Maths
	-- Andy Walker, Maths Dept, Nottingham Univ

		grep -n "" file.dat | sort -rn | sed "s/[0-9]*://"

	Possibly more in the spirit of Unix is

> reverses the lines of  file.dat. [...]
>
>	% revgrep '^' file.dat
>
>	[...] It does a grep, backwards, so
>	One way to reverse lines in a file is to use revgrep(1).