RE: sorting dates in ksh
Posted in 2004
Try awk '{print $2, $3} filename |sort -n -----Original Message----- From: chris.staubin@reebok.com [mailto:chris.staubin@reebok.com] Sent: Monday, May 03, 2004 2:13 PM To: informix-list@iiug.org Subject: sorting dates in ksh Greetings, I need help figuring out a way to sort out the data sample below. I want to sort it by the second field first, then the thierd field. The goal is to present the data by date then time in ascending order. I'm working in HPUX ksh. I tried sort -k against field 2 and it won't sort. I suspect the forward slashes need to be defined in some way... or somthing. I can't find the answer in the man page or on the Internet. Can anyone provide a sort command that will sort by $2 then $3? Thanks, -Chris Harry 05/04/04 10:45:00 Bill 05/03/04 19:00:00 Sally 05/04/04 06:30:00 Ben 05/03/04 23:30:00 Jimmy 05/04/04 00:30:00 Benny 05/03/04 18:30:00 Mike 05/03/04 20:30:00 Susan 05/03/04 21:00:00 Larry 05/03/04 21:30:00 Joe 05/03/04 22:00:00 Nancy 05/09/04 09:30:00 George 05/09/04 11:00:00 sending to informix-list sending to informix-list