2007-05-02 01:07:00 +00:00
|
|
|
BEGIN {
|
|
|
|
FS = "\t";
|
2009-06-27 07:05:19 +00:00
|
|
|
printf ("%10s %6s %5s %s\n\n",
|
2007-05-02 01:07:00 +00:00
|
|
|
"COUNTRY", "AREA", "POP", "CONTINENT");
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
printf ("%10s %6d %5d %s\n", $1, $2, $3, $4);
|
|
|
|
area = area + $2;
|
|
|
|
pop = pop + $3;
|
|
|
|
}
|
|
|
|
|
|
|
|
END {
|
|
|
|
printf ("\n%10s %6d %5d\n", "TOTAL", area, pop);
|
|
|
|
}
|