#
# Generate reports list by country/institution
# from the 'CountryInst.csv' and 'particip.csv'
#
function repchar(s1) {
s2=""
for (i=1; i<=length(s1); i++) {
s = index(" /().'",substr(s1,i,1))>0 ? "_" : substr(s1,i,1)
s2 = s2 s
}
return s2
}
BEGIN {
FS=";"
# create backup copy
# while (getline < "reports.html" != 0) print $0 > "reports.html~"
# close "reports.html"
# close "reports.html~"
# read in the header
while (getline < "Head.html" != 0) Head[++Nhdln] = $0
close "Head.html"
# read in the footer
while (getline < "Foot.html" != 0) Foot[++Nftln] = $0
close "Foot.html"
# start creating page
for (i=1; i<=Nhdln; i++) {
line = Head[i]
if (index(line, "__title__")) sub("__title__", "ELAG 2001 - Progress Reports", line)
print line
}
# title, headlines
print "
Progress Reports"
print "