|
From: | Antonio Macchi |
Subject: | Re: best way to test for empty dir? |
Date: | Fri, 11 Dec 2009 13:09:09 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
is_file() { [ -f "$1" ] } is_file /path/to/dir/* || echo empty test is redundant too --- this could be another way to accomplish this empty_dir() { eval test \" $1/* \" == \"" $1/* "\"; } (excluding invisible files...)
[Prev in Thread] | Current Thread | [Next in Thread] |