Is there a way to test whether an array contains a specified element?
e.g., something like:
array=(one two three) if [ \"one\" in ${array} ]; then ... f
A for loop will do the trick.
array=(one two three) for i in "${array[@]}"; do if [[ "$i" = "one" ]]; then ... break fi done