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