back to single level for spaceming all
[feisty_meow.git] / scripts / core / functions.sh
index a5cd8b41f0aadc9c932abad09726faf5442be2b2..2fda6b3012d3f5d4c2ca978f7d84a68fc633ebc7 100644 (file)
@@ -965,6 +965,20 @@ return 0
 
   ##############
 
+  # space 'em all fixes naming for all of the files of the appropriate types in the directories specified.
+  function spacemall() {
+    local -a dirs=("${@}")
+echo "dirs from params are: " "${dirs[@]}"
+    if [ ${#dirs[@]} -eq 0 ]; then
+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" "{}" \;
+  }
+
+  ##############
+
   # site avenger aliases
   function switchto()
   {