Find the answer to your Linux question:
Results 1 to 3 of 3
So I'm trying to sort the following: The order should be ascending by AuctionID, and then within that descending by Bid and then within that ascending by BidDateTime. So it ...
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    1

    Post Help with this Script!

    So I'm trying to sort the following:
    The order should be ascending by AuctionID, and then within that descending by Bid and then within that ascending by BidDateTime.
    So it can be output to another file.

    Here is the actually file I'm trying to sort:

    Code:
    "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
    This is what I have so far:

    Code:
    sed '1d' ebay.dat | sort -t, -k1n -k4nr -k5n > ebay_sort.dat
    Now I what to ask Ask the user to enter the auction id and use grep to get the lines stating the auction id.

    Once found, cut the fields.

    Could someone please point me in the right direction?

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    Quote Originally Posted by Gguy View Post
    Once found, cut the fields.
    What is this supposed to mean? And what exactly is the problem? Don't you know how to read user input?

  3. #3
    Just Joined!
    Join Date
    Nov 2008
    Posts
    26
    In this case, I would suggest that you go to the course instructor / professor and explain that you don't understand how to solve the homework. Honesty is the best policy.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...