Check if an element is present in a Bash array. You could do: if [[ " ${arr[*]} " == *" d "* ]]; then echo "arr contains d" fi.
確定! 回上一頁