Re: Checking if directory is empty in postrm

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

Re: Checking if directory is empty in postrm

1998-11-17 Thread Cylord
On Tue, Nov 17, 1998 at 03:05:08PM +0100, Richard Braakman wrote: > Chris Waters wrote: > > if [ "$(echo * .*)" = "* . .." ] ; then echo empty dir; fi > > Brilliant. :-) > > It has only one flaw. *cough* > > % mkdir emptydir; cd emptydir > % touch * > % if [ "$(echo * .*)" = "* . .." ] ; then e