SH проверьте, пуст ли каталог
#!/bin/bash
DIR="/tmp"
if [ "$(ls -A $DIR)" ]; then
echo "Wow, $DIR is not Empty"
else
echo "$DIR is Empty"
fi
Wrong Willet
#!/bin/bash
DIR="/tmp"
if [ "$(ls -A $DIR)" ]; then
echo "Wow, $DIR is not Empty"
else
echo "$DIR is Empty"
fi