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
array="one two three" if [ $(echo "$array" | grep one | wc -l) -gt 0 ] ; then echo yes; fi
If that's ugly, you could hide it away in a function.