array=(staging prod) if [[ ${array[*]} =~ $1 ]]; then echo "Supported Environment"; else echo "Unsupported Environment"; fi