fix stats.sh to remove trailing zeroes which make the graph fail

master
Adriel Sand 2021-10-07 11:17:25 +03:00
parent 7fe3991303
commit dc0e4d5c57
1 changed files with 7 additions and 7 deletions

View File

@ -90,13 +90,13 @@ do
then
# echo "LINE IS GREATER"
day_num=$(( $day_num + 1 ))
if [[ $day_num = 1 ]]; then day_1=$(echo $hours); day_date_1=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 2 ]]; then day_2=$(echo $hours); day_date_2=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 3 ]]; then day_3=$(echo $hours); day_date_3=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 4 ]]; then day_4=$(echo $hours); day_date_4=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 5 ]]; then day_5=$(echo $hours); day_date_5=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 6 ]]; then day_6=$(echo $hours); day_date_6=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 7 ]]; then day_7=$(echo $hours); day_date_7=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 1 ]]; then day_1=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_1=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 2 ]]; then day_2=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_2=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 3 ]]; then day_3=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_3=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 4 ]]; then day_4=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_4=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 5 ]]; then day_5=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_5=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 6 ]]; then day_6=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_6=$(echo $date_var | sed 's/\//\\\//g'); fi
if [[ $day_num = 7 ]]; then day_7=$(echo $hours | sed -n -e 's/0\([0-9]\)/\1/g' -e p); day_date_7=$(echo $date_var | sed 's/\//\\\//g'); fi
fi
done < days.csv