shithub: rc

Download patch

ref: 374de2252e8f8e797ed93fcd853216c2e6fd3264
parent: ff8443f8c2fe5e2499ff75d12a5333f9b6c43485
author: qwx <qwx@sciops.net>
date: Thu Jan 9 10:44:35 EST 2020

add dw: parallel hget(1) wrapper

--- /dev/null
+++ b/dw
@@ -1,0 +1,11 @@
+#!/bin/rc
+if(~ $1 -o){
+	of=1
+	shift
+}
+for(i in $*){
+	f=`{echo $i | sed -n 's,.*/([^/]+)$,\1,p'}
+	if(! ~ $#of 0 || ! test -e $f)
+		echo $f'
+'$i
+} | xargs -n 2 -p 10 hget -o