1*9a7741deSElliott HughesBEGIN { 2*9a7741deSElliott Hughes FS = "-" 3*9a7741deSElliott Hughes} 4*9a7741deSElliott Hughes/sh$/ { 5*9a7741deSElliott Hughes n++ 6*9a7741deSElliott Hughes l = length($NF) 7*9a7741deSElliott Hughes s += l 8*9a7741deSElliott Hughes ck %= l 9*9a7741deSElliott Hughes totck += ck 10*9a7741deSElliott Hughes print 11*9a7741deSElliott Hughes} 12*9a7741deSElliott HughesEND { 13*9a7741deSElliott Hughes if (n > 0) { 14*9a7741deSElliott Hughes printf "%d %d %d %fn\n", totck, n, s, s/n 15*9a7741deSElliott Hughes } 16*9a7741deSElliott Hughes else 17*9a7741deSElliott Hughes print "n is zero" 18*9a7741deSElliott Hughes} 19