summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xfq11
1 files changed, 11 insertions, 0 deletions
diff --git a/fq b/fq
new file mode 100755
index 0000000..8cf3832
--- /dev/null
+++ b/fq
@@ -0,0 +1,11 @@
+#!/bin/sh
+# fq - tail -f the queue outputs, quitting when the job finishes
+
+for f in ${NQDIR:-.}/,*; do
+	if ! nq -t $f; then
+		printf '==> %s\n' "$f"
+		tail -F $f & p=$!
+		nq -w $f
+		kill $p
+	fi
+done