X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=blobdiff_plain;f=scripts%2Fcore%2Ffunctions.sh;h=5faa407d9244eff64ed3d9b344917fc04333f855;hp=622102ff8eafee515f925d9791d9a1854393cab6;hb=9dd1eebc39df6e072179b0e66d1f3b2fe7d53116;hpb=a69cd017db3ccc4632a0c86a54cea42244b8bfc3 diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index 622102ff..5faa407d 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -931,8 +931,10 @@ echo "dirs from params are: " "${dirs[@]}" echo dirs had zero entries dirs=(.) fi -echo "dirs are: " "${dirs[@]}" - find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f \( $(echo pdf png jpg jpeg odt ods docx m4a mp3 eml html mov pptx xlsx zip | sed -e 's/\([a-z0-9][a-z0-9]*\)/-iname \"*.\1\" -o /g') -iname "*.txt" \) -exec bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" "{}" \; +echo "dirs are now: " "${dirs[@]}" + local ext_list="$(echo pdf png jpg jpeg odt ods docx m4a mp3 eml html mov pptx xlsx zip | sed -e 's/\([a-z0-9][a-z0-9]*\)/-iname \"*.\1\" -o /g')" +echo "ext_list=$ext_list" + find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f $ext_list -iname "*.txt" -exec bash "$FEISTY_MEOW_SCRIPTS/files/spacem.sh" "{}" \; } ##############