On 7/9/19 11:26 AM, lea.g...@noiraude.net wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > When formatting floating point numbers in Bash's built-in > printf with %s, the argument format depends on the LC_NUMERIC > environment variable.
As POSIX requires: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04 The `decimal_point' member of the LC_NUMERIC category defines the radix character in floating point numbers, for both input and output. > If the LC_NUMERIC language defines a comma , as decimal > separator, the built-in printf will not be able to recognize > floating-point numbers using a decimal point . as it is when > using the result of bc This depends on the behavior of strtold/strtod. POSIX requires strtod to honor the radix character as defined in LC_NUMERIC. Since LC_NUMERIC determines the radix character for input and output, it looks like `bc' is not POSIX conformant. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/