File sorting question
From: Nik (ndodnnn_at_yahoo.com)
Date: 05/13/03
- Next message: Barry Margolin: "Re: File sorting question"
- Previous message: Stephane CHAZELAS: "Re: deleting space between words"
- Next in thread: Barry Margolin: "Re: File sorting question"
- Reply: Barry Margolin: "Re: File sorting question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 13 May 2003 11:00:51 -0700
Hi all,
I need a quick way to sort a file (ksh, awk, perl are all fine).
The file looks like this:
P|3BLEE1E |01-JAN-2002|N|C| 2046284.28| |CAD
P|3BLEE1E |01-APR-1999|N|C| 1787056.18| |CAD
P|3BLEE1E |01-MAY-1999|N|C| 1750609.37| |CAD
P|3BLEE1E |01-MAY-2001|N|C| 2331432.6| |CAD
P|3BLEE1E |01-JUN-2001|N|C| 2308868.41| |CAD
P|3BLEE1E |01-AUG-1977|N|C| 237115| |CAD
P|3AAAFFR |01-MAY-2001|N|C| 2331432.6| |CAD
P|3AAAFFR |01-SEP-1977|N|C| 237290| |CAD
P|3AAAFFR |01-OCT-1977|N|C| 237290| |CAD
P|3AAAFFR |01-FEB-1978|N|C| 271750| |CAD
The sorting criteria is as follows: First, based on the second field
(such as 3BLEE1E) and second based on the third field ( a date field).
I know ksh sort can handle dates in this format but how do I specify
that in conjuction with the primary sorting criteria.
TIA,
NIK
- Next message: Barry Margolin: "Re: File sorting question"
- Previous message: Stephane CHAZELAS: "Re: deleting space between words"
- Next in thread: Barry Margolin: "Re: File sorting question"
- Reply: Barry Margolin: "Re: File sorting question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|