arr=( d d d a)
The code below is supposed to check if it contains d. Is there a similar way to check if it contains anything else than d?
if [[ " ${arr[*]} " == *" d "* ]]; then
echo "arr contains d"
fi
' d','d ', or' d '). That aspect of your edit was not appropriate.coded. How can I undo it ?