Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Maildir empty?
- X-seq: zsh-users 7680
- From: Klaus Wacker <wacker@xxxxxxxxxxxxxxxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Maildir empty?
- Date: Mon, 12 Jul 2004 09:37:05 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: wacker@xxxxxxxxxxxxxxxxxxxxxx
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