Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!jpradley!jpr From: jpr@jpradley.jpr.com (Jean-Pierre Radley) Newsgroups: comp.unix.shell Subject: Re: How to sort on right most column Message-ID: <1991May22.191522.19709@jpradley.jpr.com> Date: 22 May 91 19:15:22 GMT References: <13320@exodus.Eng.Sun.COM> <1991May15.140902.23225@convex.com> Organization: /usr/lib/news/organisation Lines: 11 >From the keyboard of felps@convex.com (Robert Felps): >:I don't know of any way to sort based on right to left. But you might try > With awk, $NF is the last field. So pipe the file through awk, prepending the last field ($NF) to the whole line ($0), separated by something wierd, say ^B. Pipe this to sort, then pipe to a sed to ditch characters up to and including the ^B. As I think of it, the first awk could be a sed filter too. Jean-Pierre Radley Unix in NYC jpr@jpr.com jpradley!jpr CIS: 72160,1341