[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
seq - Suggestion: Define dots as standard decimal separator, using local
From: |
Felix Neuper |
Subject: |
seq - Suggestion: Define dots as standard decimal separator, using locale as optional |
Date: |
Sat, 2 Feb 2019 00:03:31 +0000 |
Hi,
Recently I stumbled upon seq's behaviour of using the floating point
separator as defined in the current locale.
Regarding portability of scripts and standard practice in most data
processing environments, I would kindly suggest to define usage of dots
as standard behaviour and loading locale settings only when requested
via an option (e.g. -l, --locale).
Alternatively one could allow the -f option to define the separator ( -f
%1.2f still gave commas for a German locale) or base the output on the
input format ( the input issue has been addressed before:
https://lists.gnu.org/archive/html/bug-coreutils/2014-02/msg00044.html ).
Unfortunately the locale-dependency in seq's behaviour is also not
mentioned in any manual, making error tracking a hard time.
Apart from that I also noticed odd behaviour with bad locale settings:
With LANG=en_US (erroneous) and LC_NUMERIC=de_DE.UTF-8, output format is
mixed in specific cases
seq 0.1 0.2 1.3
0.1
0.3
0.5
0.7
0.9
1.1
1,3
(note the comma in the last line)
versus
seq 0.1 0.2 1.4
0.1
0.3
0.5
0.7
0.9
1.1
1.3
A comma in the last line is also observed for e.g. seq 0.1 0.3 1.9
While one should not have badly configured locales, this behaviour seems
dangerous to me.
Using version 8.28 on Mint 19.1
Thanks for maintaining these utils.
Best regards,
Felix Neuper
smime.p7s
Description: S/MIME Cryptographic Signature
- seq - Suggestion: Define dots as standard decimal separator, using locale as optional,
Felix Neuper <=