diff options
author | KatolaZ <katolaz@freaknet.org> | 2018-07-19 17:46:03 +0100 |
---|---|---|
committer | KatolaZ <katolaz@freaknet.org> | 2018-07-19 17:46:03 +0100 |
commit | 13be35d99cdb165aaf5d0c33dc557314866870f3 (patch) | |
tree | 1034d0f16269491ae3dabfe62900d8ae48bda326 | |
parent | 7671fe70a355ceb7620585475da7d0dc646a3048 (diff) |
shortened
-rwxr-xr-x | goval | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -6,9 +6,6 @@ ## (c) 2018 Vincenzo 'KatolaZ' Nicosia <katolaz@freaknet.org> ## -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 |