home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / cmplngmg / cl_jun89.arc / AWK210.ARC / TABLE.AWK < prev    next >
Text File  |  1988-03-04  |  329b  |  11 lines

  1. BEGIN { FS = "\t"   # make tab the field separator
  2.         printf("%10s %6s %5s   %s\n\n",
  3.               "COUNTRY", "AREA", "POP", "CONTINENT")
  4.       }
  5.       { printf("%10s %6d %5d   %s\n", $1, $2, $3, $4)
  6.         area = area +$2
  7.         pop = pop + $3
  8.       }
  9. END   { printf("\n%10s %6d %5d\n", "TOTAL", area, pop) }
  10.  
  11.