Browse Source

Added test* and 2018-2020* to .gitignore. Converted chug.sh to zsh

master
Trey Blancher 1 month ago
parent
commit
e4bd71e9ec
3 changed files with 9 additions and 17 deletions
  1. +5
    -0
      .gitignore
  2. +4
    -1
      chug.sh
  3. +0
    -16
      test.sh

+ 5
- 0
.gitignore View File

@ -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*

+ 4
- 1
chug.sh View File

@ -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


+ 0
- 16
test.sh View File

@ -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

Loading…
Cancel
Save