Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!usc!ucla-cs!uci-ics!zardoz!tgate!ka3ovk!ki4pv!cdis-1!tanner From: tanner@cdis-1.uucp (Dr. T. Andrews) Newsgroups: comp.unix.questions Subject: Re: Reversing a file? Summary: slight mod works even for zero-length lines Message-ID: <7658@cdis-1.uucp> Date: 5 Oct 89 15:33:47 GMT References: <1989Oct3.201759.19182@mrspoc.Transact.COM> Organization: Society to Save the Sand Gnat Lines: 9 itkin@mrspoc.Transact.COM (Steven M. List) writes: ) echo "g/./.m0\nw $OUTPUT\nq" | ex $INPUT ) :g/./.m0 Very clever, but does not deal effectively with zero-lentgh lines. In "vi", try the following (similar change for echo command above) :g/^/.m0 -- He cuts half of passenger service | {bpa,uunet}!cdin-1!cdis-1!tanner Mulroney: "cold froze our brains" | {attctc gatech!uflorida}!ki4pv!cdis-1!tanner