This document contains Frequently Asked Questions, which are relevant to completing the week's lab assignment. Any Questions may be posted to cspp51081.
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.
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.