xref: /freebsd/contrib/one-true-awk/testdir/t.time (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1BEGIN {
2	FS = "-"
3}
4/sh$/ {
5	n++
6	l = length($NF)
7	s += l
8	ck %= l
9	totck += ck
10	print
11}
12END {
13	if (n > 0) {
14		printf "%d %d %d %fn\n", totck, n, s, s/n
15	}
16	else
17		print "n is zero"
18}
19