Xref: utzoo comp.sources.wanted:9800 alt.sources.wanted:84 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ncsuvx!lll-winken!uwm.edu!uakari.primate.wisc.edu!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.sources.wanted,alt.sources.wanted Subject: Re: Backwards cat Message-ID: <1989Dec15.195258.13668@twwells.com> Date: 15 Dec 89 19:52:58 GMT References: <6488@lindy.Stanford.EDU> Distribution: usa Organization: None, Ft. Lauderdale, FL Lines: 14 In article <6488@lindy.Stanford.EDU> odin@ucscb.UCSC.EDU (Jon Granrose) writes: : I am looking for a program that will cat a file backwards. Not with all the : letters reversed but one that prints the last line, then the second to last : line, 3 from the last line, etc.) If it doesn't exist then I will write my : own but I thought I'd ask first. Try: nl | sort -nr | cut (you figure the arguments). I would not be surprised to find that this is as fast as a "tailored" program. (Why? Because the disk access pattern of the sort *might* be better than that of a file reverser.) --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com