sh Vérifiez si le répertoire est vide
#!/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