Numerisch sortieren
Ich habe eine Datei namens, dataderen Inhalt sind id,col1,col2 0,-0.3479417882673812,0.5664382596767175 1,-0.26800930980980764,0.2952025161991604 2,-0.4159790791116641,-1.3375045524610152 3,-0.7859665489205871,-0.6428101880909471 4,-1.3922759043388822,-1.676262144826317 5,-1.2471867496427498,-0.4912119581361516 6,1.443385383041667,1.6974039491263593 7,-2.058899802821969,2.0607628464079917 8,-0.10641338441541626,0.035929568275064216 9,-0.517273684861199,-0.6184800988804992 10,-0.9934859021679552,1.0577312348984502 11,0.5923834706792905,-0.6693757541250825 12,0.8657741917554445,-0.6876271057571398 13,-1.2061097548360489,-0.7402582563022937 14,0.78768021182158,-0.38607117005262315 Das numerische Sortieren ( -n) in der ersten Spalte ergibt $ sort -nk1 -t"," data 0,-0.3479417882673812,0.5664382596767175 id,col1,col2 1,-0.26800930980980764,0.2952025161991604 2,-0.4159790791116641,-1.3375045524610152 3,-0.7859665489205871,-0.6428101880909471 4,-1.3922759043388822,-1.676262144826317 5,-1.2471867496427498,-0.4912119581361516 7,-2.058899802821969,2.0607628464079917 8,-0.10641338441541626,0.035929568275064216 9,-0.517273684861199,-0.6184800988804992 10,-0.9934859021679552,1.0577312348984502 …