Introduction
Introduction Statistics Contact Development Disclaimer Help
README: document old behaviour and alternative for xargs -P and -0 - sfeed - RS…
git clone git://git.codemadness.org/sfeed
Log
Files
Refs
README
LICENSE
---
commit 34b0cefd3e144744d65ad1d2ad8e73c8d185b1f0
parent 7f27e5c39dcd64b4c7951e4ff8e31d98a3c12047
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 22 Dec 2024 14:11:05 +0100
README: document old behaviour and alternative for xargs -P and -0
Diffstat:
M README | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/README b/README
@@ -1182,6 +1182,36 @@ This changes the yank command to set the tmux buffer, in…
SFEED_YANKER="tmux set-buffer \`cat\`"
+Alternative for xargs -P and -0
+-------------------------------
+
+Most xargs implementations support the options -P and -0.
+GNU or *BSD has supported them for over 20+ years!
+
+These functions in sfeed_update can be overridden in sfeedrc, if you don't want
+to use xargs:
+
+ feed() {
+ # wait until ${maxjobs} are finished: will stall the queue if …
+ # is slow, but it is portable.
+ [ ${signo} -ne 0 ] && return
+ [ $((curjobs % maxjobs)) -eq 0 ] && wait
+ [ ${signo} -ne 0 ] && return
+ curjobs=$((curjobs + 1))
+
+ _feed "$@" &
+ }
+
+ runfeeds() {
+ # job counter.
+ curjobs=0
+ # fetch feeds specified in config file.
+ feeds
+ # wait till all feeds are fetched (concurrently).
+ [ ${signo} -eq 0 ] && wait
+ }
+
+
Known terminal issues
---------------------
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.