Subject: diremtpy or "exists"?

From: Erich Schubert <[email-masked]>
Date: Sat, 02 Sep 2006 03:55:33 +0200

Hi,
A minute ago I didn't need "dirempty", but "exists 'foo/*.bar'"
test -e "foo" works fine if you have the filename. If you have wildcards
it gets a bit more complicated. IMHO it would be good to have a
convenience command for this instead of using some shell magic with test
and ls.

best regards,
Erich Schubert
-- 
     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C     (o_
             Reality continues to ruin my life --- Calvin              //\
Wende Dein Gesicht der Sonne zu, dann fallen die Schatten hinter Dich. V_/_

---

From: Joey Hess <[email-masked]>
Date: Thu, 7 Sep 2006 20:45:27 -0400

> convenience command for this instead of using some shell magic with test

Hmm, and dirempty is just ! exists foo/* && ! exists foo/.* , right?

-- 
see shy jo

---

From: Erich Schubert <[email-masked]>
Date: Fri, 08 Sep 2006 03:20:02 +0200

Hi Joey,
> Hmm, and dirempty is just ! exists foo/* && ! exists foo/.* , right?

Maybe "exists -d foo" would be nicer for this.
In many applications, "exists 'foo/*'" would do the job okay enough (if
you don't plan to rm the directory)

best regards,
Erich Schubert
-- 
     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C    (o_
        To be trusted is a greater complement than to be loved.       //\
 Man kann sich auch in Gesellschaft anderer einsam fühlen. Weizsäcker V_/_