From: utzoo!decvax!decwrl!sun!megatest!fortune!sri-unix!Michael.Young@Cmu-10a Newsgroups: net.unix-wizards Title: Re: want program to reverse lines in a file Article-I.D.: sri-unix.3720 Posted: Sat Oct 9 08:26:54 1982 Received: Sun Oct 17 05:04:34 1982 From: Michael Wayne Young Date: 8 October 1982 1344-EDT (Friday) Well, I don't have one, but it'd only take a couple of minutes -- here's the quick and dirty solution: reverse the whole file (character by character) first, then run "rev" to get the lines back in the right order. [The only problem you have to worry about is the trailing newlines; still, that's easy to deal with.] You can read blocks from the end, and reverse them, writing them to the new file. Simple, eh? Michael