Commit f7edc3c3 authored by vagrant's avatar vagrant

removed test file

parent 21172507
#!/bin/bash
declare -A projects
total=0
while read LINE
do
IFS=, read start end name email projectId country billFlag hours<<< "$LINE"
if [[ $billFlag == "Y" ]]; then
projects[$projectId]=$(( ${projects[$projectId]} + $hours ))
total=$(( $total + $hours ))
fi
done < ./timesheet.csv
printf "%-20s %6s\n" "Project" "Hours"
for projectId in "${!projects[@]}"
do
printf "%-20s %6s\n" "$projectId" "${projects["$projectId"]}"
done
printf "%-20s %6s\n" "Total" "$total"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment