propStats script

Write a script called propStats that uses Linux commands to give statistics about the property data.

For every question, add a comment before the code explaining what question is being answered. Label the output to make it readable (Use echo and include the question number listed below).

Your script should take the file to process as a command-line argument. You only need to handle one.

  1. How many unique counties are represented in the data?
  2. How many unique postcodes?
  3. How many properties are missing the postcode in the proper field?
  4. How many apartments were sold?
  5. What is the least expensive house?
  6. What is the most expensive?
  7. How many properties include information about the area of the property sold?
  8. Add 2 interesting questions (explain them in a comment) to ask of the data.
    For each of your 2 new questions, write the Linux code to programatically answer the question (as best you can).

Remember - for the 2 new "questions", each should be your own idea and should be:

  1. interesting
  2. non-trivial to implement (so don't just do the same question with cutting a different column)
  3. implemented in your script as much as you can

Optional:
  1. Use functions.
  2. Handle multiple files as input (process multiple arguments) and report on each file individually.