|
| From: | pk |
| Subject: | Re: best way to test for empty dir? |
| Date: | Fri, 11 Dec 2009 12:31:49 +0000 |
| User-agent: | KNode/4.3.3 |
Marc Herbert wrote:
> For purists, does this one works even better?
>
> is_file3()
> {
> for f
> do
> [ -e "$f" -o -L "$f" ] && return
> done
> return 1
> }
You might also want to enable "dotglob" to catch hidden files...
| [Prev in Thread] | Current Thread | [Next in Thread] |