On 24-09-2009, at 09h 24'35", Wu, Yue wrote about "Re: How to remove empty 
maildir?"
> 
> #!/bin/sh
> 
> DIR="~/temp/mails/*"
> 
> for d in ${DIR}; do
>         if [ $(find d -type f | wc -l) -eq 0 ] ; then
>                 rm -r d
>         fi
> done
> 

#!/bin/sh

DIR="~/temp/mails/*"

for d in ${DIR}; do
        if [ $(find $d -type f | wc -l) -eq 0 ] ; then
                rm -r $d
        fi
done



Ionel

Reply via email to