Using a seq command with floating point numbers, my output comes with commas instead of dots as decimal separators, despite using dots in the input:
seq 0.1 0.3 1.3
0,1
0,4
0,7
1,0
1,3
I assumed this to be linked with the locale LC_NUMERIC, which is set to de_DE.UTF-8, however a change to en_US.UTF-8 did not fix it and another system I have using the very same locale settings does return dots. Even explicitly defining a format via e.g. -f %1.2 does not return dots but commas as decimal separators.
Where and how do I change this behaviour? How to ensure my script will error-free on any given system? Obviously any output will be unusable for further processing if not reprocessed via tr the like.
Using an English installation of Mint in German time zone and raspian on the other machine.
Edit: locale settings on the given machines:
The "comma" one:
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
The "dot" one:
LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="C.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
Setting LANGUAGE does not affect the result.