#!/bin/csh -f

# print out how many 100% sectors each country has
# uses the file "power" which needs to have a power report
# in it

# if the format of power changes the "9" in substr($0,1,9) might need to
# change or the -13 & -12's might need to change.

awk 'NF>14{rat=$(NF-13)*substr($(NF-12),1,length($(NF-12))-1);if(rat>0){printf "%20s	%d\n",substr($0,1,9),rat/100}}' power | sort -n -r '-t	' +1

