How to sort on right most column
Chris Sherman
sherman at unx.sas.com
Sat May 18 12:00:14 AEST 1991
In <13320 at exodus.Eng.Sun.COM> rock at 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 at 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.
More information about the Comp.unix.shell
mailing list