Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!mcnc!rti!mozart!sherman From: sherman@unx.sas.com (Chris Sherman) Newsgroups: comp.unix.shell Subject: Re: How to sort on right most column Message-ID: Date: 18 May 91 02:00:14 GMT References: <13320@exodus.Eng.Sun.COM> Sender: news@unx.sas.com (Noter of Newsworthy Events) Organization: SAS Institute Inc. Lines: 27 Nntp-Posting-Host: foster.unx.sas.com In <13320@exodus.Eng.Sun.COM> rock@warp.Eng.Sun.COM (Bill Petro) writes: >How could I do this using either the sort command, or perl or awk? >I have the following data in this format - I want to sort it on the >right most column. > 0 1 2 3 4 > a b c c e > FOO BAR ACE CORPORATION SUNNYVALE 2.00 > FOO BAR ACER COMPUTED COMPANY MILPITAS 20.00 I hate to be a spoil sport, but how about from the unix prompt: % sort -n +.60b Maybe you could do something like this inside perl... I'm not sure how though, and still keep it really fast. -- Chris Sherman .................... sherman@unx.sas.com | ,-----------------------------------------' / Q: How many IBM CPU's does it take to execute a job? | A: Four; three to hold it down, and one to rip its head off.