Subject: Re: Help with sorting
From: Arthur Corliss (acorliss@nevaeh-linux.org)
Date: Tue Feb 24 2004 - 12:28:00 AKST
On Tue, 24 Feb 2004 jonr@destar.net wrote:
>
> I cannot code and need a way to parse out a long list, here is a snippet
> of that list.
>
> ('C952tenblpl.zap2it.com', 'TENBLPL', '952'),
> ('C953tenblox.zap2it.com', 'TENBLOX', '953'),
> ('C99oln.zap2it.com', 'OLN', '99'),
> ('C9loor009.zap2it.com', 'LOOR009', '9'),
>
> I want to be able to parse on the last number of each one of these lines
> and sort them from 1-953. Can someone give me a hand with this?
cat $file | sort -k 3 -n -r | awk '{ print $NF }' | cut -d\' -f 2
--Arthur Corliss
Bolverk's Lair -- http://arthur.corlissfamily.org/
Digital Mages -- http://www.digitalmages.com/
"Live Free or Die, the Only Way to Live" -- NH State Motto
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
This archive was generated by hypermail 2a23 : Tue Feb 24 2004 - 12:28:37 AKST