Path: utzoo!attcan!uunet!wuarchive!cs.utexas.edu!rutgers!rochester!kodak!ispd-newsserver!garden!weimer From: weimer@garden.kodak.COM (Gary Weimer (588-0953)) Newsgroups: comp.editors Subject: Re: Global Empty Line Removal in vi? Message-ID: <1991Jan24.150144.15282@ssd.kodak.com> Date: 24 Jan 91 15:01:44 GMT References: <1991Jan24.064310.8077@midway.uchicago.edu> Sender: news@ssd.kodak.com Reply-To: weimer@ssd.kodak.com Organization: Eastman Kodak Co.; Rochester, NY Lines: 22 In article , chris@bilby.cs.uwa.oz.au (chris mcdonald) writes: |> In <1991Jan24.064310.8077@midway.uchicago.edu> zi0h@quads.uchicago.edu (W. Ishii) writes: |> |> >Hello there! As a vi novice (maybe a stronger term is called for--vi idiot, |> >probably), I've been stuck for about a week now trying to figure out how to |> >globally remove multiple blank lines from text. |> |> Filter the whole file (with !! ) through cat -s Since he declared himself a "vi idiot," perhaps we should be a little more explicit: 1G!Gcat -s 1G goes to the beginning of the file, !G pipes from current line (the first one in this case) to end of file cat -s removes extra blank lines Gary Weimer