Browse Source

Added running subtotal to do_process.sh

master
Trey Blancher 4 months ago
parent
commit
5bc7c4af89
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      do_process.sh

+ 3
- 0
do_process.sh View File

@ -54,9 +54,12 @@ if [[ -f ${DATE} ]]; then
echo
echo
WHOLE=""
subtotal=0
for pattern in "${KEYS[@]}"; do
#echo "pattern=${pattern}" >&2
$grep -- "\[${pattern}\]" ${DATE} | timetracker
subtotal=$(bc <<< "scale=2; ${subtotal} + $($grep -- "\[${pattern}\]" ${DATE} | timetracker | $grep "Section" | $grep -Po '\d+\.\d+hrs' | tr -d '[hrs]')")
printf "Subtotal: %3.2fhrs\n" ${subtotal}
echo
if [[ "${WHOLE}x" == "x" ]]; then
WHOLE="${pattern}"


Loading…
Cancel
Save