diff --git a/.gitignore b/.gitignore index 3241e5f..3686a07 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,12 @@ *.tar *.pyc *.sw* +test.* work timetracker.py-pre-incident-fixup do_process.bak2017-11-06_file-test 2017* +2018* +2019* +2020* +2021* diff --git a/chug.sh b/chug.sh index 16ba6bf..8878a1a 100755 --- a/chug.sh +++ b/chug.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/zsh PATH=/Users/tblancher/bin:/Users/tblancher/homebrew/opt/coreutils/libexec/gnubin:/usr/bin:/bin [[ "${1}" == "-i" ]] && IGNORE_DO_PROCESS=1 && shift @@ -19,6 +19,9 @@ for date in $(date +%F -d "${DATE}") \ if [[ -f ${date}.log ]]; then [[ -n $IGNORE_DO_PROCESS ]] || ./do_process.sh ${date}.log | less daily_total=$(./do_process.sh ${date}.log | grep -P "Grand total:" | grep -Po "\d+\.\d+") + if [[ ${daily_total} -gt 24 ]]; then + daily_total=24.00 + fi else daily_total=0 fi diff --git a/test.sh b/test.sh deleted file mode 100755 index 3e33bd1..0000000 --- a/test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -ORGS=() - -get_list_of_orgs () { - orgs=$( grep -Po "\s+\[.*\]" | tr -d '[][]' ) - for org in ${orgs}; do - [[ "${ORGS[@]}" =~ "${org}" ]] || ORGS+=("${org}") - done -} - -get_list_of_orgs < 2017-09-20.log - -for (( i=0; i < ${#ORGS[@]}; i++)); do - echo ${ORGS[$i]} -done