Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
From: Parker Barrington <parkerb@dbis.ns.ca>
Subject: Problem Sorting on Two Keys
Date: 1997/07/17	[thread overview]
Message-ID: <33CEC873.7B68@dbis.ns.ca> (raw)


Has anyone had any success sorting on two keys using a delimiter.
In my case | is the delimiter.  I want to sort on the 4th field and
within all occurrences of the 4th field I want to sort on the 3rd
field, ie

sort -t\| -k4 -k3 filename

filename output looks like the following after using the above sort
command - field 4 is ordered OK but field 3 (ie Charles, Karen & Brian
Smith) are not in order.

Any help is appreciated,  TIA. 

S530|SMITH|Brenda J.|Heinsma|heinsma@mail.atcon.com
S530|SMITH|Arthur|Johnson|ahjhnsn@aol.com
S530|SMITH|Don|Park|donpark@igs.net
S530|SMITH|Claire|Smith-Burns|passinc@awinc.com
S530|SMITH|Terri|Smith-Weller|smithwel@u.washington.edu
S530|SMITH|Charles Paul|Smith|73702.466@compuserve.com
L534|LANDELLS|Karen|Smith|KSMITH@SWBI.NET
S530|SMITH|Brian|Smith|gsmith@pica.army.mil
S530|SMITH|Heather|Stanley|heathers@gp.apl.cul.ca
S530|SMITH|Nelson M.|Warner|nmwarner@naples.net

-- 
Parker Barrington
parkerb@tuns.ca
parkerb@dbis.ns.ca



                 reply	other threads:[~1997-07-17  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox