2020-01-15 commit before remove_general branch
This commit is contained in:
parent
a6460caee8
commit
388c43c94f
10
do_process
10
do_process
|
@ -1,7 +1,7 @@
|
||||||
#!/Users/tblancher/homebrew/bin/bash
|
#!/Users/tblancher/homebrew/bin/bash
|
||||||
|
|
||||||
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
|
||||||
|
grep=/Users/tblancher/homebrew/opt/coreutils/libexec/gnubin/grep
|
||||||
|
|
||||||
declare -A ORGS
|
declare -A ORGS
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ if [[ -f ${DATE}.log ]]; then
|
||||||
}
|
}
|
||||||
get_list_of_orgs () {
|
get_list_of_orgs () {
|
||||||
while read; do
|
while read; do
|
||||||
org=$( grep -Po "\s+\[.*\]" <<< "${REPLY}" | tr -d '[][]' | xargs )
|
org=$( $grep -Po "\s+\[.*\]" <<< "${REPLY}" | tr -d '[][]' | xargs )
|
||||||
[[ "${org}x" == "x" ]] && continue
|
[[ "${org}x" == "x" ]] && continue
|
||||||
# org="${org##*( )}" # trim leading whitespace
|
# org="${org##*( )}" # trim leading whitespace
|
||||||
# org="${org%%*( )}" # trim trailing whitespace
|
# org="${org%%*( )}" # trim trailing whitespace
|
||||||
|
@ -56,7 +56,7 @@ if [[ -f ${DATE}.log ]]; then
|
||||||
WHOLE=""
|
WHOLE=""
|
||||||
for pattern in "${KEYS[@]}"; do
|
for pattern in "${KEYS[@]}"; do
|
||||||
#echo "pattern=${pattern}" >&2
|
#echo "pattern=${pattern}" >&2
|
||||||
grep -- "\[${pattern}\]" ${DATE}.log | timetracker
|
$grep -- "\[${pattern}\]" ${DATE}.log | timetracker
|
||||||
echo
|
echo
|
||||||
if [[ "${WHOLE}x" == "x" ]]; then
|
if [[ "${WHOLE}x" == "x" ]]; then
|
||||||
WHOLE="${pattern}"
|
WHOLE="${pattern}"
|
||||||
|
@ -65,9 +65,9 @@ if [[ -f ${DATE}.log ]]; then
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
done
|
done
|
||||||
grep -Ev "${WHOLE}" ${DATE}.log | timetracker
|
$grep -Ev "${WHOLE}" ${DATE}.log | timetracker
|
||||||
echo
|
echo
|
||||||
timetracker ${DATE}.log | grep "Section" | sed 's/Section/Grand/'
|
timetracker ${DATE}.log | $grep "Section" | sed 's/Section/Grand/'
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "${DATE}.log does not exist" >&2
|
echo "${DATE}.log does not exist" >&2
|
||||||
|
|
Loading…
Reference in New Issue