]> git.plutz.net Git - serve0/blobdiff - widgets.sh
call sed via xargs, which seems to be quicker than find -exec
[serve0] / widgets.sh
index 35b8b70ed349a9414e020e1789df3dc4176aa301..f825c12c8213678ab4bb74caab25a61cba128bea 100644 (file)
@@ -16,9 +16,10 @@ if [ ! -s "$c_tags" -o ! -s "$c_tagcategories" ] \
   then
   w_tags="$( cn=1
     find "$_DATA/" -path '*/.index/meta' -print0 \
-    | xargs -r0 sed -r '
+    | xargs -0 -r sed -E '
       s;^.*\t.*\t.*\ttags=(.*)\tcomment=.*\t.*\r$;\1;;
-      s;,;\n;g;'"$UNSTRING" \
+      s;,;\n;g;' \
+    | UNSTRING \
     | { sort; printf '\n'; } \
     | while read -r tag; do
       [ "$tag" = "$otag" ] \