Check If Directory Is Empty
if [[ "$(ls -A /tmp)" ]]; then
echo "Directory is not empty"
else
echo "Directory is empty OR does not exist."
fi
if [[ "$(ls -A /tmp)" ]]; then
echo "Directory is not empty"
else
echo "Directory is empty OR does not exist."
fi