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

Re: Checking if directory is empty in postrm



On Tue, Nov 17, 1998 at 11:04:28PM -0500, Raul Miller wrote:
> Cylord <C@Cryogen.com> wrote:
> 
> > if [ "$(echo * ? .*)" = "* ? . .." ] ; then echo REALLY empty dir; fi
> 
> You also need .? or else you're subject to:
> 
> mkdir emptydir2; touch .*

With that echo command, 'touch ".*"' gives an echo result of:

* ? . .* ..

Which is not equal, giving the desired result.


Reply to: