gno/usr.bin/awk/tests/ch1p41.awk
tribby ddb82cb2e0 Remaining files for awk 2.0 that were left out of the previous checkin.
Maybe someday I'll become adept at using cvs...
1998-04-07 17:06:53 +00:00

8 lines
246 B
Awk

$2 > 6 { n = n + 1; pay = pay + $2 * $3 }
END { if (n > 0)
print n, "employees, total pay is", pay,
"average pay is", pay/n
else
print "no employees are paid more than $6/hour"
}