Is there any way to format the number into two decimals with a comma so that they show as PROD DB Size: 2,330.17 GB - %USED:73.94 rather than PROD DB Size: 2330.17322 - %USED: 73.9445703 ?
---------- Post updated at 17:16 ---------- Previous update was at 17:13 ----------
From printf manual:
A block size specification preceded by `'' causes output sizes to be
displayed with thousands separators. The `LC_NUMERIC' locale specifies
the thousands separator and grouping. For example, in an American
English locale, `--block-size="'1kB"' would cause a size of 1234000
bytes to be displayed as `1,234'. In the default C locale, there is no
thousands separator so a leading `'' has no effect.