Results 1 to 3 of 3

Thread: unix sorting

  1. #1

    unix sorting

    I am trying to sort below data on column 2 which is the Hamilton, Jefferson, Washington, Boston but I can't sort it look like Alias, Hamilton, Jefferson, and Washington

    bash> sort +2d -2d pb.dat

    1:Hamilton,Alexander:882-0246:New York, NY
    3:Washington,George:123-456-7890:Mt. Vernon, VA
    7:Alias, Boston:123-4455:Columbia, MO

    Anybody see the problem or suggestion?

  2. #2
    Join Date
    May 2005
    u mean something like this:

    sort -k2,3 +2d -2d -t:


    Get Your wordpress blog at Blogsby!

  3. #3
    I think I figure it out. Should look like this sort -t: +1 filename.

    Yours is seperated by tab but thank you very much for taking time look on my problem. Have a nice day. I might post more question about unix because i am a beginner and have a homework due so i need need for many small thing.

    thanks again

    Originally posted by Grooby
    u mean something like this:

    sort -k2,3 +2d -2d -t:



Posting Permissions

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