Colorado State University

This file defines the header for each page. An optional "icon" image (I use the textbook):

Three headers follow: ! Long name of class !! Semester !!! HW 4, replaced by the name of the current page.

CS155: Introduction to Unix

Fall 2013

HW 4

Links to the various pages for this class:

Wish I could do this: * Schedule

CS155 HW4: Area Codes

Summary

In this assignment, you will write a bash script called acode which will tell you telephone area code information. The file ~cs155/pub/area-codes contains this information.

Sample runs, where % is my prompt:

    % ./acode
    usage: ./acode <query> ...
    % ./acode 303
    Area codes for "303":
       303 Central Colorado: Denver (see 970, also 720 overlay)
    % ./acode 303 970
    Area codes for "303":
       303 Central Colorado: Denver (see 970, also 720 overlay)
    Area codes for "970":
       970 N and W Colorado (part of what used to be 303)
    % ./acode Denver
    Area codes for "Denver":
       303 Central Colorado: Denver (see 970, also 720 overlay)
       720 Central Colorado: Denver (overlaid on 303)
    % ./acode Wonderland
    Area codes for "Wonderland":
    % ./acode enver
    Area codes for "enver":
       303 Central Colorado: Denver (see 970, also 720 overlay)
       720 Central Colorado: Denver (overlaid on 303)
    % ./acode e
    Area codes for "e":
       that gave 356 matches

Requirements

How to submit your homework:

Follow the directions on the homework page.

How to receive negative points:

Turn in someone else’s work.
Page: Main.HW4
Modified: September 17, 2013, at 09:30 PM
Wiki: pmwiki-2.2.35
CS Department
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2012 Colorado State University