From: Paul Hänsch Date: Mon, 13 Sep 2021 17:54:31 +0000 (+0200) Subject: call sed via xargs, which seems to be quicker than find -exec X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=65f7fdd29c51ce924260a9aae21f29fa15154dcb;p=serve0 call sed via xargs, which seems to be quicker than find -exec --- diff --git a/widgets.sh b/widgets.sh index f79d457..f825c12 100644 --- a/widgets.sh +++ b/widgets.sh @@ -15,10 +15,10 @@ if [ ! -s "$c_tags" -o ! -s "$c_tagcategories" ] \ || [ "$(find "$_DATA/" -path '*/.index/meta' -newer "$c_tags")" ] then w_tags="$( cn=1 - find "$_DATA/" -path '*/.index/meta' -exec \ - sed -E 's;^.*\t.*\t.*\ttags=(.*)\tcomment=.*\t.*\r$;\1;; - s;,;\n;g;' \ - '{}' + \ + find "$_DATA/" -path '*/.index/meta' -print0 \ + | xargs -0 -r sed -E ' + s;^.*\t.*\t.*\ttags=(.*)\tcomment=.*\t.*\r$;\1;; + s;,;\n;g;' \ | UNSTRING \ | { sort; printf '\n'; } \ | while read -r tag; do