SUMMARY: sort-Problem

Werner.Rost_at_zf.com
Date: 12/02/04

  • Next message: Carlos Sanchez: "mcicap entry for ADIC FastStore2"
    Date: Thu, 02 Dec 2004 11:50:43 +0100
    To: tru64-unix-managers@ornl.gov
    
    

    Hi managers,

    the list is great, thanks for the quick answers.

    Original problem below.

    Solution: Sort should know that the fields are numeric. Therfore adding "n"
    does the job:

        sort -t . -k 12n -k 11n <file>

    Again thanks a lot. Have a nice day.

    Werner Rost

    -----

    I am sure this is a rather trivial exercise for most of you - but not for
    me;-)

    DU 5.1A - I want to sort data first by the 12. field and second by the
    11.field. fields are separatet by ".".

    The command "sort -t . -k 12 -k 11 <file>" gives:

    1.3.6.1.2.1.10.7.2.1.9.23 = 0
    1.3.6.1.2.1.10.7.2.1.9.23 = 0
    1.3.6.1.2.1.10.7.2.1.10.24 = 0
    1.3.6.1.2.1.10.7.2.1.10.24 = 0
    1.3.6.1.2.1.10.7.2.1.11.24 = 0
    1.3.6.1.2.1.10.7.2.1.11.24 = 0
    1.3.6.1.2.1.10.7.2.1.13.24 = 0
    1.3.6.1.2.1.10.7.2.1.13.24 = 0
    1.3.6.1.2.1.10.7.2.1.2.24 = 0
    1.3.6.1.2.1.10.7.2.1.2.24 = 0
    1.3.6.1.2.1.10.7.2.1.4.24 = 0
    1.3.6.1.2.1.10.7.2.1.4.24 = 0
    1.3.6.1.2.1.10.7.2.1.5.24 = 0
    1.3.6.1.2.1.10.7.2.1.5.24 = 0
    1.3.6.1.2.1.10.7.2.1.6.24 = 0
    1.3.6.1.2.1.10.7.2.1.6.24 = 0
    1.3.6.1.2.1.10.7.2.1.7.24 = 0
    1.3.6.1.2.1.10.7.2.1.7.24 = 0
    1.3.6.1.2.1.10.7.2.1.8.24 = 0
    1.3.6.1.2.1.10.7.2.1.8.24 = 0
    1.3.6.1.2.1.10.7.2.1.9.24 = 0
    1.3.6.1.2.1.10.7.2.1.9.24 = 0
    1.3.6.1.2.1.16.1.1.1.11.24 = 10 < not sorted by field 11
    1.3.6.1.2.1.10.7.2.1.3.24 = 10 < not sorted by field 11
    1.3.6.1.2.1.16.1.1.1.8.24 = 10 < not sorted by field 11
    1.3.6.1.2.1.16.1.1.1.11.24 = 33 < not sorted by field 11
    1.3.6.1.2.1.10.7.2.1.3.24 = 80 < not sorted by field 11
    1.3.6.1.2.1.16.1.1.1.8.24 = 80 < not sorted by field 11
    1.3.6.1.2.1.10.7.2.1.10.3 = 0
    1.3.6.1.2.1.10.7.2.1.10.3 = 0

    Unfortunatly some lines are not sorted as I expect.

    Which sort command does what I want?

    Thanks in advance for your help.

    Yours sincerely
    Werner Rost
    GM-FIR - Netzwerk
     
    ZF Boge Elastmetall GmbH
    Friesdorfer Str. 175, 53175 Bonn, Deutschland/Germany Telefon/Phone +49 228
    3825 - 420 Telefax/Fax +49 228 3825 - 398 werner.rost@zf.com
     


  • Next message: Carlos Sanchez: "mcicap entry for ADIC FastStore2"

    Relevant Pages

    • Re: thinking, loose ends, chaos, and assumptions
      ... >>>If scientists were truly thinking about their field there would be so ... > devise some sort of test for the site to test the hypothesis I had ... > science is being used to buttress a predetermined point of view. ... but not the answer to the original problem. ...
      (sci.geo.geology)
    • Re: Topic Sentences (Was: descriptive/external exercises)
      ... or "For three days they rested, repaired the ship, and foraged for provisions." ... And maybe the same sort of (slight, ... What is the original problem you were trying to ... If you're looking to "calibrate" the reader, ...
      (rec.arts.sf.composition)
    • Re: pain in neck calculus problem
      ... I have not solved this problem, but I sort of played with it a little, ... Since we need 2 inflection points, ... to be a perfect square. ... that will not solve the original problem. ...
      (sci.math)