Thanks to the answer of anubhava here (https://stackoverflow.com/a/32873200/12365630) we know how to search inside an array if there is another element not like the rest of them, so i tried something similar to find out it does not work.
example, all elements should be UP, if one (or more) is not then give a message
$ arr=(UP DOWN UP UP)
$ [[ " ${arr[*]} " == *" "[^U]" "* ]] && echo "array has non-UP element(s)" || echo "no"
no
it should state that there is an non-UP (second, that DOWN) element in that array but it fails. probably it matches only letters and not words..
how should that part "[^U]" be to get this fixed?
also it would be nice to understand this better, can someone explain in detail this whole part
*" "[^U]" "* ?