Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Maildir empty?



Dear zsh, is there a zsh-internal way to find out whether a maildir is
empty? Or more generally, whether a directory tree contains no
files? The following test ($i is the pathname of the maildir):

    if [[ $(echo $i/*/* | wc -w) -eq 0 ]]

works with `setopt extendedglob nullglob', but I am sure there is some
combination of {}[]()$#@% which avoids spawning of a subshell and an
external program. 


-- 
Klaus Wacker              wacker@xxxxxxxxxxxxxxxxxxxxxx
Experimentelle Physik V   http://www.physik.uni-dortmund.de/~wacker
Universitaet Dortmund     Tel.: +49 231 755 3587
D-44221 Dortmund          Fax:  +49 231 755 4547



Messages sorted by: Reverse Date, Date, Thread, Author