summary refs log tree commit diff
path: root/fq
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-02 18:40:51 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-02 18:40:51 +0200
commit2cf28ae77c6db26063b1702d37996e48a0a5e4fb (patch)
tree0daaae9b452cff87f7444bcdc0c618dbe7df0d34 /fq
parentead617c8c376563ec46bd903fb52d47d251a61ce (diff)
downloadnq-2cf28ae77c6db26063b1702d37996e48a0a5e4fb.tar.gz
nq-2cf28ae77c6db26063b1702d37996e48a0a5e4fb.tar.xz
nq-2cf28ae77c6db26063b1702d37996e48a0a5e4fb.zip
add fq
Diffstat (limited to 'fq')
-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