fix for properly parsing apache scientific numbers #211
Costa Tsaousis (ktsaou) committed
Apr 13, 2016 at 10:52 UTC
31bc8a96dcff6ffe92d1675afee47433365a81d6
1 file changed
+1
-1
plugins.d/charts.d.plugin
+1
-1
@@ -250,7 +250,7 @@ float2int() {
250
l=$[ ${#m} - 1 ]
251
252
# check if the number is in scientific notation
253
- if [[ ${f} =~ ^[[:space:]](-)?[0-9.]+(e|E)(\+|-)[0-9]+ ]]
253
+ if [[ ${f} =~ ^[[:space:]]*(-)?[0-9.]+(e|E)(\+|-)[0-9]+ ]]
254
then
255
# convert it to decimal
256
# unfortunately, this fork cannot be avoided