Ensure LC_NUMERIC=C is set when evaluating floating point number (non-English systems might expect "," as decimal separator

This commit is contained in:
DL6ER 2017-01-13 12:59:49 +01:00
parent b4c32e47c6
commit 845d8c0e63
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -57,7 +57,7 @@ normalChrono() {
domains=$(printf "%'.f" $(GetJSONValue ${json} "domains_being_blocked")) #add commas in
queries=$(printf "%'.f" $(GetJSONValue ${json} "dns_queries_today"))
blocked=$(printf "%'.f" $(GetJSONValue ${json} "ads_blocked_today"))
percentage=$(printf "%0.2f\n" $(GetJSONValue ${json} "ads_percentage_today")) #2 decimal places
LC_NUMERIC=C percentage=$(printf "%0.2f\n" $(GetJSONValue ${json} "ads_percentage_today")) #2 decimal places
echo "Blocking: ${domains}"
echo "Queries: ${queries}"