Commit aadfd621 authored by Shanelle Valencia's avatar Shanelle Valencia

Add generateReport file

parent 0ad9d401
#! /bin/bash
while read LINE
do
totalhours=0
awk -F"," '{
if (($7 == "Y"))
arr[$5] += $8;
totalhours=totalhours + $8;
}
END{for(key in arr)
{ print key, arr[key] }
{ totalhours += arr[key] }
{ print "Total: " totalhours }
}'
done < <(cat ./timesheet.csv | sort -k5 )
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