On 10/8/21 6:37 AM, Pádraig Brady wrote:

The difference here is due to ',' being treated as a thousands sep,
not a decimal point.

Oh, thanks. Of course! I should have figured that out myself.

It is unfortunate that "," is treated as a thousands seperator even though it's obviously not one (as it's not followed by 3 decimal digits). I don't think POSIX requires this behavior; it's not clear to me that POSIX even allows it.

This bug report suggests that we should alter the code so that 'sort -n' acts more like common practice, and requires thousands separators to be in the right places in order to treat nearby digits to be part of the number. Alternatively, we could document the existing behavior (even if it's not clear that it conforms to POSIX).



Reply via email to