SH Sprawdź, czy katalog jest pusty
#!/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