From: Werner.Rost@zf.com
Subject: sort-Problem
Date: Thu, 02 Dec 2004 11:09:25 +0100 [thread overview]
Message-ID: <923B59E7C539B94FAD82D0D375B69CDA099F6581@BNNS00001> (raw)
Hi managers,
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
reply other threads:[~2004-12-02 10:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox