On 8/19/21 9:41 AM, Léa Gris wrote: > This will fail because of questionable design decision of having a mutable > argument format: > > LC_NUMERIC=fr_FR@UTF-8; printf 'Pi: %2.4f\n` "$(bc -l <<<'4*a(1)')" > > Note how the format indicator still use a dot, but the argument format's > decimal separator is that of the system's locale.
That's not a decimal point. The `2.4' is not some sort of decimal or floating point number. The dot just separates the field width from the precision. If the argument is, in fact, a floating point number with a radix character, the radix character is appropriately locale-dependent. -- ``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/