coreutils
coreutils copied to clipboard
numfmt: won't do grouping in Windows OS
Hi,
Many thanks for these utilities - especial thanks for the Windows binaries.
I am trying to format numbers as currency in the UK. e.g. £12,000.99
The UK pound character is a problem - so I am happy with $.
From my batch file:
cat.exe data.csv | numfmt.exe -d, --header --field=2-4 --format="$%%'.2f" >> output.txt
I think that numfmt.exe is getting the ' to trigger grouping, but it does not seem to read my locale from the operating system.
Is there a way to force a locale or an environment variable I can set somehow?
For completeness, this is how I get the UK pound sign to display in Notepad.exe:
sed.exe -i s/\$/\xA3/g output.txt
Any help welcome.
Kind Regards Gavin Holt
Grouping has not been implemented yet.
Yep, this might also be related: https://github.com/uutils/coreutils/issues/1280.
Grouping is a bit tricky to implement because it is locale-dependent.
Leaving this open for others to find.