Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!maverick.ksu.ksu.edu!hoss!hoss.unl.edu!sanjiv From: sanjiv@hoss.unl.edu (Sanjiv K. Bhatia) Newsgroups: comp.editors Subject: Re: vi - alphabetical sort Keywords: alphabetical sort of a file Message-ID: <1990Dec13.003140.19886@hoss.unl.edu> Date: 13 Dec 90 00:31:40 GMT References: <1990Dec12.214128.16549@sunee.waterloo.edu> Sender: news@hoss.unl.edu (Network News Administer) Organization: Computing Resource Center, University of Nebraska Lines: 22 In article <1990Dec12.214128.16549@sunee.waterloo.edu> neman@sunee.waterloo.edu (Neman "Napalm" Syed) writes: >Hi! Another question from another vi-illiterate. How does one >perform an alphabetical sort of all items in a file? The >specific file I'm thinking of is my very non-alphabetical >.newsrc, which I'd love to have organized. Is this possible? From within vi, issue this command: :%!sort >-- >Neman Syed - Rebel Without A Clue >neman@sunee.uwaterloo.ca or neman@108.watstar.uwaterloo.ca >Opinions expressed are solely those of my employers and in >no way affect or represent those of Neman Syed. -- Sanjiv K. Bhatia Department of Computer Science sanjiv@fergvax.unl.edu Ferguson Hall 115 voice: (402)-472-3485 University of Nebraska - Lincoln fax: (402)-472-7767 Lincoln, NE 68588-0115