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
Try this:
array=(one two three) if [[ "${array[*]}" =~ "one" ]]; then echo "'one' is found" fi