Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.unix.questions Subject: Re: testing if a directory is empty (OOOPS!) Message-ID: Date: 16 Apr 91 02:15:45 GMT References: <1991Apr15.195513.17840@beaver.cs.washington.edu> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 21 In-reply-to: pauld@cs.washington.edu's message of 15 Apr 91 19:55:13 GMT In article <1991Apr15.195513.17840@beaver.cs.washington.edu> pauld@cs.washington.edu (Paul Barton-Davis) writes: ... | So it needs to be: | | [ "`cd $1 ; echo .??* *`" = ".??* *" ] | | this picks up a dot files too (anyone who has a dot file called ".a" | should be taken out and shot :-) It still isn't any reason to fail. Off of the top of my head, the following should work: [ "`cd $1; echo .[^.] .??* *`" = ".[^.] .??* *" ] -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?