2 ms·if [ ${#array[@]} -gt 0 ]; then a better way to write it: if (( ${#array[@]} > 0 )); thenby shmerl 9y agoif [ ${#array[@]} -gt 0 ]; then a better way to write it: if (( ${#array[@]} > 0 )); thenHello71 9y agothe idiomatic way: if (( ${#array[@]} )); thenshmerl 9y agoI prefer not to use implicit boolean conversions. It's also less readable.