What about this output? sort -k1 input > out 009 2919 009 3107 0.0 9312 00a 3294 00A 3389 00a 3484 00A 3578 00a 3670 00A 4142 00b 4236 00B 4332 00b 4801 This is no sorting. It is random garbage. Since when 00a < 00B? This utility used to work fine in earlier distributions, until you broke it down. Please return to previous lexicographic mode and cut the "cute" things. Nikos