seq使用逗号作为小数点分隔符 [英] seq uses comma as decimal separator
问题描述
我注意到我的一台计算机(Ubuntu LTS 14.04)上有一个奇怪的 seq
行为:它不是使用点作为小数分隔符,而是使用逗号:
I have noticed a strange seq
behavior on one of my computers (Ubuntu LTS 14.04): instead of using points as decimal separator it is using commas:
seq 0. 0.1 0.2
0,0
0,1
0,2
我的另一台PC上的相同版本的seq(8.21)给出了正常的分数(也是相同的Ubuntu版本).最奇怪的是,当我从第一台计算机上将它放入ssh时,我在远程计算机上观察到同样的不良行为.甚至从冲突机器提交到远程机器上的作业计划程序(slurm)的bash脚本也存在此问题.我很困扰.为什么(以及如何!)发生?
The same version of seq (8.21) on my other PC gives the normal points (also same Ubuntu version). The strangest thing is that I am observing the same ill behavior on a remote machine when I ssh into it from the first machine. Even a bash script submitted from the conflictive machine to a job scheduler (slurm) on the remote machine is having this problem. I am very confused. Why (and how!) is this happening?
推荐答案
可能是 LANG
变量或某些其他特定于语言环境的变量.在 seq
表现为正常"的计算机上,尝试:
It's likely the LANG
variable or some other locale-specific variable. On a computer where seq
behaves "normally" try:
$ LANG=fr_FR seq 0. 0.1 0.2
0,0
0,1
0,2
$ LANG=en_US seq 0. 0.1 0.2
0.0
0.1
0.2
这篇关于seq使用逗号作为小数点分隔符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!