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...)
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...)