bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sort


From: Violeta Gonzalez Perez
Subject: sort
Date: Fri, 19 Jan 2007 21:06:36 +0100 (CET)

Hi,
I'm not sure if what I found is a bug but it doesn't make much sense to me. I'm using sort to sort numerically 2 files that differ after the third column and I find that the sorting depends on this difference. I show you below and example of this behaviour. I use > to show the comand on the comand line. I start sorting numerically a file with 4 columns called "tirame1", saving the result into "tirame2". Then I copy only the 3 first columns into a new file called "tirame3". If I sort numerically this last file and save it as "tirame4", I find differences between "tirame3" and "tirame4". Why?

----------------------------------------------------------------------
more tirame1
268 51633 134 75657056366886912
268 51633 138 75657056383664128
268 51633 146 75657056417218560
268 51633 14 75657055863570432
268 51633 161 75657056480133120
268 51633 163 75657056488521728
268 51633 201 75657056647905280
268 51633 218 75657056719208448
268 51633 219 75657056723402752
268 51633 222 75657056735985664
268 51633 224 75657056744374272
268 51633 264 75657056912146432
268 51633 268 75657056928923648
268 51633 274 75657056954089472
268 51633 294 75657057037975552
268 51633 303 75657057075724288
268 51633 305 75657057084112896
268 51633 30 75657055930679296
268 51633 315 75657057126055936
sort -n tirame1 > tirame2
awk '{print $1,$2,$3}' tirame2 > tirame3
sort -n tirame3 > tirame4
diff tirame3 tirame4
3d2
< 268 51633 146
4a4
268 51633 146
15a16
268 51633 30
18d18
< 268 51633 30
---------------------------------------------------------

Thanks,
Violeta






reply via email to

[Prev in Thread] Current Thread [Next in Thread]