miller
miller copied to clipboard
Thousands separator
It seems that printf
's thousands separator flag ('
) is not supported, e.g.
$ echo '12345,12345.67' | mlr --c2p -N format-values -i "%'d" -f "%'.2f"
1 2
12345 12345.67
. Expected output is
1 2
12,345 12,345.67
. How to get this?
Workaround:
$ echo '12345,12345.67' | mlr --c2t -N cat |
numfmt -d $'\t' --field=1,2 --grouping --invalid=ignore |
column -t -s $'\t'
12,345 12,345.67
Wondering how locale-dependent that would turn out to be, since different countries use different characters to that purpose... :thinking: