MACSCRPT Archives

November 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Baxter <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 22 Nov 2006 10:41:31 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
On Nov 22, 2006, at 10:13 AM, Bob R. wrote:

> Thanks, Mark.  I thought something might be there in shell  
> scripting, but I could not
> remember.

Take a look at man sort if you need anything fancy.  Unix sort can do  
many interesting things (including sorting English 3-character month  
abbreviations  in the sequence of the months during the year),  
sorting numerically (so that 9 comes before 10), ignoring leading  
spaces, sorting on multiple fields (keys), returning only a single  
copy of items which aren't unique (per the keys), checking that the  
input is already in order, rather than changing the order, and so on.

   --John

ATOM RSS1 RSS2