Re: best way to test for empty dir?

2009-12-14 Thread Matias A. Fonzo
On Mon, 14 Dec 2009 12:21:12 + Marc Herbert wrote: > Matias A. Fonzo a écrit : > > On Fri, 11 Dec 2009 16:16:13 + > > Marc Herbert wrote: > > >> In case anyone is interested my winner (so far) is: > >> > >> exists() > >> { > >> [ -e "$1" -o -L "$1" ] > >> } > >> > > > > > The -L i

Re: add a way to declare global variables

2009-12-14 Thread Bernd Eggink
Am 12/14/09 13:37, schrieb Marc Herbert: Bernd Eggink a écrit : To avoid misunderstandings, let me add that you are right (only) with respect to variables being used _without_ declaration. OK, but not having to explicitly "declare" variables is a feature that most people expect from dynamic la

Re: add a way to declare global variables

2009-12-14 Thread Marc Herbert
Bernd Eggink a écrit : > To avoid misunderstandings, let me add that you are right (only) with > respect to variables being used _without_ declaration. OK, but not having to explicitly "declare" variables is a feature that most people expect from dynamic languages, so you can hardly blame them fo

Re: best way to test for empty dir?

2009-12-14 Thread Marc Herbert
Matias A. Fonzo a écrit : > On Fri, 11 Dec 2009 16:16:13 + > Marc Herbert wrote: >> In case anyone is interested my winner (so far) is: >> >> exists() >> { >> [ -e "$1" -o -L "$1" ] >> } >> > > The -L is redundant. Not for me. I need -L because I want to consider broken symlinks just l