awk/testdir/t.match1

7 lines
158 B
Plaintext
Raw Normal View History

2019-06-23 05:13:57 -04:00
NF > 0 && match($NF, $1) {
print $0, RSTART, RLENGTH
if (RLENGTH != length($1))
printf "match error at %d: %d %d\n",
NR, RLENGTH, RSTART >"/dev/tty"
}