# check if array is empty
if [ ${#array[@]} -gt 0 ]; then
echo "Array is not empty."
fi
# check if array is empty
if [ -z "${array[*]}" ]; then
echo "Array is not empty."
fi
# check if array is empty
if [ ${#array[@]} -gt 0 ]; then
echo "Array is not empty."
fi
# check if array is empty
if [ -z "${array[*]}" ]; then
echo "Array is not empty."
fi