Closed krzo93 closed 3 years ago
I suppose the scripts may not have been tested for other locales, but just to be 100% - could you check and confirm the output of the below:
printf "%3.3e\n" "4.896071809053199e-2";locale
LC_ALL='C.UTF-8'; printf "%3.3e\n" "4.896071809053199e-2"
Hi @rdlrt
First time I've got invalid number again, after the second command it seems to look fine I think.
Command: printf "%3.3e\n" "4.896071809053199e-2"; Output: 4.896e-02
Any idea what this is happening? Just locale related issue?
Thanks
Any idea what this is happening? Just locale related issue?
Yeah - as I mentioned , most of the testing would've occurred using en
locales. In your case, I am guessing your locale recognises numbers as comma (v/s decimal). Thus, causing trouble.
A quick fix for you would be to add the below to your $CNODE_HOME/scripts/env file (under User Variables section):
export LC_ALL='C.UTF-8'
So, something like this:
I would think that should make guild tools use C.UTF8 for locale values instead of your system default, thereby not hitting you mentioned
Hi @rdlrt
Yeah, I've changed my system default now to C.UTF-8.
Thanks
Describe the bug When running gLiveMode script on Centos OS 8, I am getting some printf errors on the display.
To Reproduce Steps to reproduce the behavior:
Expected behavior Correct calculation of tips, density etc..
Screenshots
Version:
Additional context This is the lines that are shown in the screenshot above.
./gLiveView.sh: line 746: printf: 17.91296296296296296200: invalid number 746: epoch_items=$(( $(printf %.0f "${epoch_progress}") * granularity / 100 ))
./gLiveView.sh: line 741: printf: 17.91296296296296296200: invalid number 741: epoch_progress_1dec=$(printf "%2.1f" "${epoch_progress}")
./gLiveView.sh: line 513: printf: 4.896071809053199e-2: invalid number 513: density=$(printf "%3.3e" "${density}"| cut -d 'e' -f1)