2020-01-15 commit before remove_general branch

This commit is contained in:
Trey Blancher 2020-01-15 11:21:45 -05:00
parent a6460caee8
commit 388c43c94f
1 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/Users/tblancher/homebrew/bin/bash
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
@ -21,7 +21,7 @@ if [[ -f ${DATE}.log ]]; then
}
get_list_of_orgs () {
while read; do
org=$( grep -Po "\s+\[.*\]" <<< "${REPLY}" | tr -d '[][]' | xargs )
org=$( $grep -Po "\s+\[.*\]" <<< "${REPLY}" | tr -d '[][]' | xargs )
[[ "${org}x" == "x" ]] && continue
# org="${org##*( )}" # trim leading whitespace
# org="${org%%*( )}" # trim trailing whitespace
@ -56,7 +56,7 @@ if [[ -f ${DATE}.log ]]; then
WHOLE=""
for pattern in "${KEYS[@]}"; do
#echo "pattern=${pattern}" >&2
grep -- "\[${pattern}\]" ${DATE}.log | timetracker
$grep -- "\[${pattern}\]" ${DATE}.log | timetracker
echo
if [[ "${WHOLE}x" == "x" ]]; then
WHOLE="${pattern}"
@ -65,9 +65,9 @@ if [[ -f ${DATE}.log ]]; then
fi
echo
done
grep -Ev "${WHOLE}" ${DATE}.log | timetracker
$grep -Ev "${WHOLE}" ${DATE}.log | timetracker
echo
timetracker ${DATE}.log | grep "Section" | sed 's/Section/Grand/'
timetracker ${DATE}.log | $grep "Section" | sed 's/Section/Grand/'
else
echo "${DATE}.log does not exist" >&2