CMSC 106 HOMEWORK ASSIGNMENT #5

DUE: January 26, 1998 (start of class)

  1. Write a basic version of the Unix utility "grep. It works as follows:
              grep [ -v -i] textstring filename
    
    Note, I do not expect you to implement full pattern matching, just matching for alphabetic strings. Also you may want to check out the man page for "grep" to get more info.
  2. Document the code. Comments should be brief but informative. A good rule of thumb is a comment for each function. Also a header comment with your name, social security number, the assignment number, a general description of the program and the names of any files in your account needed to execute the program.
  3. Execute the code using the "script" command to retain the run.
  4. Hand in a print-out of the documented code along with the runs.