Add tt/sum.sh

This commit is contained in:
2023-02-04 17:25:28 +01:00
parent 109f9cb65e
commit e316c56266

11
tt/sum.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
function get_sum() {
cut -d";" -f4 "$1.csv" | tail -n+2 | paste -sd+ | bc
}
hil=$(get_sum "HIL")
ste=$(get_sum "STE")
total=$(echo "$hil+$ste" | bc)
echo -e "HIL:\t$hil\nSTE:\t$ste\nTotal:\t$total"