12 lines
216 B
Bash
Executable File
12 lines
216 B
Bash
Executable File
#!/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"
|