From 3ff66011803ccc28c2203e0ca90088111abb57c2 Mon Sep 17 00:00:00 2001 From: Marco van Zwetselaar Date: Sun, 24 Jun 2018 01:01:54 +0300 Subject: [PATCH] In uf-bare check for accidental application to non-unfasta --- uf-bare | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uf-bare b/uf-bare index c43a53a..f32824d 100755 --- a/uf-bare +++ b/uf-bare @@ -70,7 +70,8 @@ done # Do the work -awk -b -O -v F="$HDRSFILE" ' +awk -b -O -v F="$HDRSFILE" -v P="$(basename "$0")" ' + NR%2==1 && substr($0,1,1) != ">" { print P ": warning: discarding line that does not look like a FASTA header: " $0 > "/dev/stderr" } NR%2==1 && F { print > F } NR%2==0' "$@"