From 13be35d99cdb165aaf5d0c33dc557314866870f3 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Thu, 19 Jul 2018 17:46:03 +0100 Subject: shortened --- goval | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'goval') diff --git a/goval b/goval index 6c598c6..d1fcf6c 100755 --- a/goval +++ b/goval @@ -6,9 +6,6 @@ ## (c) 2018 Vincenzo 'KatolaZ' Nicosia ## -FIN=${1:-/dev/stdin} - -res=$(cat $FIN | sed -n -E -e '/(^[0-9+gIThis].*\t.*\t.*\t|^\.\r$)/! =' | tr '\n' ' ') - -[ -z "$res" ] && exit 0 -echo "Errors on lines: $res" >&2 && exit 1 +[ -z "$(cat ${1:-/dev/stdin} | sed -n -E -e '/(^[0-9+gIThis].*\t.*\t.*\t|^\.\r$)/! =' \ + | tr '\n' ' ' | tee /dev/stderr )" ] && exit 0 +echo && exit 1 -- cgit v1.2.3