bash file counting

main
Zynh Ludwig 2024-08-01 02:59:26 -07:00
parent 56a95dba69
commit f85b574a5d
1 changed files with 3 additions and 1 deletions

View File

@ -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 ~"