Is there a way of checking if a string exists in an array of strings - without iterating through the array?
For example, given the script below, how I can correctly impl
q=( 1 2 3 ) [ "${q[*]/1/}" = "${q[*]}" ] && echo not in array || echo in array #in array [ "${q[*]/7/}" = "${q[*]}" ] && echo not in array || echo in array #not in array