From 774a8f2d098fa242c5bac528e51ca62fca0bd9a4 Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Wed, 5 Aug 2015 14:55:09 +0200 Subject: rename fq to fq.sh --- fq.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 fq.sh (limited to 'fq.sh') diff --git a/fq.sh b/fq.sh new file mode 100644 index 0000000..99774fe --- /dev/null +++ b/fq.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# fq - tail -F the queue outputs, quitting when the job finishes + +tailed=false +for f in ${NQDIR:-.}/,*; do + if ! nq -t $f; then + tailed=true + printf '==> %s\n' "$f" + tail -F $f & p=$! + nq -w $f + kill $p + fi +done + +if ! $tailed; then + cat $f +fi -- cgit 1.4.1