testing if a directory is empty (OOOPS!)
Michael Meissner
meissner at osf.org
Tue Apr 16 12:15:45 AEST 1991
In article <1991Apr15.195513.17840 at beaver.cs.washington.edu>
pauld at 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 at 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?
More information about the Comp.unix.questions
mailing list