X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fcore%2Ffunctions.sh;fp=scripts%2Fcore%2Ffunctions.sh;h=8c9c0b2aceaa64699457f5ba2ace684dbddb6fe9;hb=e54c96f8d18c5e801c4068a1778166ad22b675b0;hp=a2b28bddeccc72ec056c5d564df0753af9c708fa;hpb=c9e97b01e01eb4724e4b1307645ba839c035543d;p=feisty_meow.git diff --git a/scripts/core/functions.sh b/scripts/core/functions.sh index a2b28bdd..8c9c0b2a 100644 --- a/scripts/core/functions.sh +++ b/scripts/core/functions.sh @@ -950,7 +950,9 @@ return 0 local charnfile="$(mktemp $TMP/zz_charn.XXXXXX)" #hmmm: any way to do the below more nicely or reusably? - find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f | \ +#hmmm: yes! a variable with a list of files that are considered TEXT_FILE_EXTENSIONS or something like that. +#hmmm: yes continued! also a variable for BINARY_FILE_EXTENSIONS to avoid those, where we need to in other scripts. + find "${dirs[@]}" -follow -maxdepth 1 -mindepth 1 -type f -and -not -iname ".[a-zA-Z0-9]*" | \ grep -i \ "csv\|doc\|docx\|eml\|html\|jpeg\|jpg\|m4a\|mov\|mp3\|ods\|odt\|pdf\|png\|ppt\|pptx\|rtf\|txt\|vsd\|vsdx\|xls\|xlsx\|xml\|zip" | \ sed -e 's/^/"/' | sed -e 's/$/"/' | \