Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.unix.questions Subject: Re: Shell Programming Question - sort Message-ID: <5734@star.cs.vu.nl> Date: 3 Mar 90 06:52:09 GMT References: <751@ncs.dnd.ca> Sender: news@cs.vu.nl Reply-To: maart@cs.vu.nl (Maarten Litmaath) Organization: VU Informatika, Amsterdam, the Netherlands Lines: 11 In article <751@ncs.dnd.ca>, marwood@ncs.dnd.ca (Gordon Marwood) writes: )I am trying to sort (using "sort" in Ultrix) based on the last two )characters in a line (which are numeric). There are a variable number )of characters in a line, and these last two characters are preceded by a )space, [...] sed 's/\(.*\) \(..\)$/\2 \1/' | sort | sed 's/\(..\) \(.*\)/\2 \1/' -- "Belfast: a sentimental journey to the Dark Ages - Crusades & Witchburning - Europe's Lebanon - Book Now!" | maart@cs.vu.nl, uunet!mcsun!botter!maart