#! /usr/bin/gawk -f # Last edited on 2000-01-24 06:58:32 by stolfi # Totalizes O-slots in output of count-o-slots /[0-9]/{ c=substr($0,1,64); n = $1; sl = $11; oc = $12; w=$13; tsl += sl*n; toc += oc*n; print; } END{ printf " %7d O-slots, %7d occupied (%.1f%%)\n", tsl, toc, 100.0*toc/tsl; }