summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pbjparse.awk8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/pbjparse.awk b/bin/pbjparse.awk
index 8ba5372..be75811 100755
--- a/bin/pbjparse.awk
+++ b/bin/pbjparse.awk
@@ -83,15 +83,13 @@ function parsepbj ( cmd) # cmd is a "local" var
tcmd = joinfields(2)
templates[++templcount] = tcmd
}
- else if ($1 == "") ; # ignore blank lines
- else {
- print "ignoring line " FNR ": " $0 | "cat 1>&2"
- }
+ else if ($1 ~ /^[ \t]*$/) ; # ignore lines of whitespace
+ else die("invalid input: " $0)
}
function die (msg)
{
- printf "%s:%s.%d:%s\n", PROG, FILENAME, FNR, msg | "cat 1>&2"
+ printf "%s: error: %s:%d %s\n", PROG, FILENAME, FNR, msg | "cat 1>&2"
exit 1
}