From 2bb551efd8b3e50d715482a8f3b89f88bae74397 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 3 Jul 2024 17:55:45 +0200 Subject: Rename fq -> nqtail, tq -> nqterm There's only so many two letter binaries that can exist at the same time. A newer project, called fq, arrived and is clashing with nq in many packaging systems, and nqtail is a fine name too. --- nqtail.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 nqtail.sh (limited to 'nqtail.sh') diff --git a/nqtail.sh b/nqtail.sh new file mode 100755 index 0000000..d2d3816 --- /dev/null +++ b/nqtail.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# nqtail - 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