Exclude non list stuff

This commit is contained in:
Bob Mottram 2017-01-29 13:42:16 +00:00
parent fccbbfaf4e
commit 1b8bdaccfe
1 changed files with 5 additions and 3 deletions

View File

@ -62,9 +62,11 @@ function remove_user_from_mailing_list {
list_name=() list_name=()
while read -r listname; do while read -r listname; do
i=$((i+1)) i=$((i+1))
if [[ "$listname" != *']'* && "$listname" != *'['* ]]; then
W+=($i "$listname") W+=($i "$listname")
list_name+=("$listname") list_name+=("$listname")
echo $listname echo $listname
fi
done <<< "$USER_MAILING_LISTS" done <<< "$USER_MAILING_LISTS"
i=$((i+1)) i=$((i+1))