diff --git a/powerwall.sh b/powerwall.sh index bd4bb602..fccc60fe 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -613,7 +613,7 @@ TEST(){ temptotal=0 while IFS=$'\t' read date sensorid temp hum ;do # echo date:$date sensorid:$sensorid temp:$temp hum:$hum - temptotal=$(expr ${temptotal} + ${temp}) + temptotal=$((${temptotal} + ${temp})) echo "- ${temptotal} + ${temp}" done < <(${mysql_conn} -se "USE servermonitor; SELECT date,sensorid,temp,hum from sensor_data WHERE sensorid=2 ORDER BY id DESC LIMIT 10;")