bash file counting
This commit is contained in:
parent
56a95dba69
commit
f85b574a5d
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,9 @@ in
|
||||||
target=''${args[1]}
|
target=''${args[1]}
|
||||||
|
|
||||||
if [ -d "''$target" ]; then
|
if [ -d "''$target" ]; then
|
||||||
if ${pkgs.findutils}/bin/find "''$target" -maxdepth 0 -empty; then
|
files=(''$target"/*")
|
||||||
|
|
||||||
|
if [ ''$(''$files[@]) -gt 0 ]; then
|
||||||
echo "~ Found Files at ''$target ~"
|
echo "~ Found Files at ''$target ~"
|
||||||
else
|
else
|
||||||
echo "~ No Files in ''$target ~"
|
echo "~ No Files in ''$target ~"
|
||||||
|
|
Loading…
Reference in a new issue