Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* Problem Sorting on Two Keys
@ 1997-07-17  4:00 Parker Barrington
  0 siblings, 0 replies; only message in thread
From: Parker Barrington @ 1997-07-17  4:00 UTC (permalink / 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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-07-17  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-07-17  4:00 Problem Sorting on Two Keys Parker Barrington

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