[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking if directory is empty in postrm



Cylord wrote:
> On Tue, Nov 17, 1998 at 03:05:08PM +0100, Richard Braakman wrote:
> > Chris Waters wrote:
> > > if [ "$(echo * .*)" = "* . .." ] ; then echo empty dir; fi
[but]
> > touch *
[fixed by]
> if [ "$(echo * ? .*)" = "* ? . .." ] ; then echo REALLY empty dir; fi

Good save!  And a great demonstration of the advantages of free
software, peer review, and the bazaar model!  :-)

cheers
-- 
Chris Waters   xtifr@dsp.net | I have a truly elegant proof of the
or   cwaters@systems.DHL.COM | above, but it is too long to fit into
http://www.dsp.net/xtifr     | this .signature file.


Reply to: