#!/bin/bash

containsElement()
{
    local element="$1"
    shift
    local arr=("$@")

    for item in "${arr[@]}"; do
        if [[ "$item" == *"$element"* ]]; then
            return 0
        fi
    done

    return 1
}
