tblancher's timetracker timekeeping system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
timetracker/test.sh

16 lines
293 B

#!/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