Added test* and 2018-2020* to .gitignore. Converted chug.sh to zsh
This commit is contained in:
parent
5bc7c4af89
commit
e4bd71e9ec
|
@ -4,7 +4,12 @@
|
||||||
*.tar
|
*.tar
|
||||||
*.pyc
|
*.pyc
|
||||||
*.sw*
|
*.sw*
|
||||||
|
test.*
|
||||||
work
|
work
|
||||||
timetracker.py-pre-incident-fixup
|
timetracker.py-pre-incident-fixup
|
||||||
do_process.bak2017-11-06_file-test
|
do_process.bak2017-11-06_file-test
|
||||||
2017*
|
2017*
|
||||||
|
2018*
|
||||||
|
2019*
|
||||||
|
2020*
|
||||||
|
2021*
|
||||||
|
|
5
chug.sh
5
chug.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/zsh
|
||||||
|
|
||||||
PATH=/Users/tblancher/bin:/Users/tblancher/homebrew/opt/coreutils/libexec/gnubin:/usr/bin:/bin
|
PATH=/Users/tblancher/bin:/Users/tblancher/homebrew/opt/coreutils/libexec/gnubin:/usr/bin:/bin
|
||||||
[[ "${1}" == "-i" ]] && IGNORE_DO_PROCESS=1 && shift
|
[[ "${1}" == "-i" ]] && IGNORE_DO_PROCESS=1 && shift
|
||||||
|
@ -19,6 +19,9 @@ for date in $(date +%F -d "${DATE}") \
|
||||||
if [[ -f ${date}.log ]]; then
|
if [[ -f ${date}.log ]]; then
|
||||||
[[ -n $IGNORE_DO_PROCESS ]] || ./do_process.sh ${date}.log | less
|
[[ -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+")
|
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
|
else
|
||||||
daily_total=0
|
daily_total=0
|
||||||
fi
|
fi
|
||||||
|
|
16
test.sh
16
test.sh
|
@ -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…
Reference in New Issue