Lab2 FAQ

This document contains Frequently Asked Questions, which are relevant to completing the week's lab assignment. Any Questions may be posted to cspp51081.

Bonus points for Exercise 1

Write your gawk script so that the user can type any two-letter state abbreviation and any three-letter month abbreviation, and have the contents displayed. This should only take a couple of changes to your script.

Submitting Bonus Credit

The only way to recieve credit for bonus, is to follow the submission procedure below.

How the homework will be tested.

Exercise 1: You will need an awk script file (this simply means a file written for awk to read, and requires nothing special on your part), which we will test by running:

  % awk -f ex2.awk normal.precip.txt

       The normal rainfall for Alaska is XX.XX
       The normal rainfall for California is XX.XX
       The normal rainfall for Texas is XX.XX

Your script does not need to reproduce this text exactly, but must identify the state and the correct rainfall.

Submitting the Bonus, a clarification.

If you plan on writing versions of the exercise which are more robust (as explained above), you only need to submit two script files ex1 and ex2 plus a document entitled README to explain the correct commandline syntax and what your script does.
Exercise 1: You will probably want to implement ex1 as a shell script, since it will need arguments supplied by the user. For example

  % ex1.awk CA JAN

       The normal rainfall for CA in the month of JAN is XX.XX

The exact output is up to you but it must identify the state and month.