Student Originated Software 1997-1998
Winter Quarter

A Software Engineering Course at
The Evergreen State College

Introduction to Database Systems

UNIX Potluck

Assignment #2
Due January 24th


  1. At the prompt type in a command that will display the middle 10 lines of a 30 line program.

  2. Use Awk to print
    1. the longest line in a file
    2. the shortest line
    3. the one that contains the most spaces
    4. the 10th line
    5. the total number of input lines
    6. the entire file with the first record on each line replaced by the line number
    7. the entire file with the first two records reversed

        Hint: you probably want to generate some test files for these. For f and g, you probably want to build a formatted file where records are separated by tabs

  3. List the sequence of characters (starting at a shell prompt) that yields a text file containing only the word "yams"
    1. using vi
    2. using emacs
    3. using pico

        Which editor took the most keystrokes?

  4. Using the find command, print out all the files that are beneath the /usr directory that contain the word "mail" in them. Do it again but this time only show the files that have been changed this year.

Super User

  1. Write a script or command line sequence of piped commands (e.g. cat, tr, sort, uniq, and head) to display the 25 most common words in all the files in a directory.

  2. Using Awk (and/or other Unix tools) output a list of people that have sent you mail arranged in order of total number of messages sent. (Hint: use the commands "from" and "cut." You may also need others...)

  3. Design a web page that returns the current time. (Use CGI programming and Perl -- or other language)


  1. Implement the current time assignment (from above) that displays the time in a graphical way.

      (Warning: this might not be so easy!)

  2. Make a script that goes text files and prints each sentence on its own line.

For more information contact
[ Evergreen Home Page | Academic Programs ]

Created by: SoSwEbGrOuP