Homework 6 – Awk

Given out:  Monday, October 21, 2019

Due on:  Wednesday, October 30, 2019 at 1159pm via BLACKBOARD

You will need access to a Unix (or Unix-like) system for this assignment. There is no requirement to use a particular system, or kind of system.

You will need to submit your name, student ID, your script, and the output described below.  Of course, create a nice PDF file to submit with your code and your output.

Download and save a local copy of the file census.txt. This file contains data from the 2000 US census. The file is tab-delimited, and the fields are County name, population, water area (in square miles), land area (in square miles). This file covers the counties in Washington state.

Write an awk script that will parse the data, and for each county, print the county name, the population per square mile of land, and the percentage of the county that is water. (Note that the total area of the county is the sum of the land and water areas.)

At the end, your script should print the county name and the value for the following criteria:

-Highest population density

-Lowest population density

-Highest percentage of land

-Lowest percentage of land

So, for example, you might print out "Highest population density: Adams County, 9999 people/square mile"