Update tt/sum.sh

This commit is contained in:
2023-03-17 10:38:04 +01:00
parent d212ab7528
commit 1e55f9b0d2

View File

@ -7,5 +7,7 @@ function get_sum() {
hil=$(get_sum "HIL") hil=$(get_sum "HIL")
ste=$(get_sum "STE") ste=$(get_sum "STE")
total=$(echo "$hil+$ste" | bc) total=$(echo "$hil+$ste" | bc)
hil_perc=$(echo "$hil*100/$total" | bc)
ste_perc=$(echo "$ste*100/$total" | bc)
echo -e "HIL:\t$hil\nSTE:\t$ste\nTotal:\t$total" echo -e "HIL:\t$hil\t(${hil_perc}%)\nSTE:\t$ste\t(${ste_perc}%)\nTotal:\t$total"