fix space padding in float2int
Costa Tsaousis (ktsaou) committed
Jan 23, 2016 at 15:22 UTC
e4d812049fe669091e7ee6ecc22da10e36827c31
1 file changed
+3
-2
plugins.d/charts.d.plugin
+3
-2
@@ -241,9 +241,10 @@ fixid() {
241
# so that no fork is necessary
242
# the multiplier must be a power of 10
243
float2int() {
244
- local f="$1" m="$2" a b l
244
+ local f m="$2" a b l v=($1)
245
+ f=${v[0]}
246
246
- #echo >&2 "f='${f}', m='${m}'"
247
+ # echo >&2 "value='${1}' f='${f}', m='${m}'"
248
249
# the length of the multiplier - 1
250
l=$[ ${#m} - 1 ]