I need help with the sort command. Here is the following code I have so far, but I cant get it to sort it the way i want.
head -1 ebay.dat > ebay_out.dat
awk 'NR>1' ebay.dat| sort -k1.2,1.10 -k1.1,1.1 -k2,2 >> ebay_out.dat
This what I have so far.
The sort order should be ascending by AuctionID, and then within that descending by Bid and then within that ascending by BidDateTime.
Here is the actually file I'm trying to sort:
"AuctionID","UserID","BidderRating","Bid","BidDateTime"
1070387924,"rmichaelll",46,407.00,2/12/2002 14:07:44
1070387924,"decocloxcolektor",155,402.00,2/12/2002 14:07:28
1070387924,"markartz",6,350.00,2/12/2002 11:11:52
1070387924,"markartz",6,275.00,2/12/2002 1:23:19
1070387924,"mcintron55@aol.com",179,265.00,2/11/2002 16:17:12
1070387924,"jellyroll33",325,250.00,2/5/2002 14:49:17
1070387924,"markartz",6,250.00,2/9/2002 14:56:53
1070387924,"jarmst1626@aol.com",14,200.00,2/2/2002 21:25:06
1070387924,"jellyroll33",325,200.00,2/5/2002 14:48:20
1070387924,"tfbarr",13,155.00,2/3/2002 6:25:18
1070387924,"nz-auctions",214,130.00,2/2/2002 22:13:34
1071065640,"quakenbusch.de",139,26.00,2/11/2002 10:51:28
1071065640,"mrdobbalina",65,25.00,2/4/2002 16:18:46