CS 302 - Data Structures & Algorithms II - Spring 2008
Homework 8


Loyola College > Department of Computer Science > CS 302 > Homework > Homework 8

Due

Monday, February 11 at the beginning of class

Assignment

  1. Write a tcsh shell script that outputs information about files in the current directory. The information should include details about the file, the first line of the file, and the last line of the file. The script should ignore any sub-directories in the directory. For example, if the script were run in the directory /cs302/classExamples/l8, the output should be
    -rw-r--r-- 1 lawrie lawrie 221 2008-02-05 15:18 classExamples/l8/gdbEx.c
    // File: gdbEx.c
    }
    
    -rw-r--r-- 1 lawrie lawrie 1962 2008-02-05 15:18 classExamples/l8/LinkedList.c
    #include 
    
    
    -rw-r--r-- 1 lawrie lawrie 329 2008-02-05 15:18 classExamples/l8/LinkedList.h
    #include 
    #endif
    
    -rw-r--r-- 1 lawrie lawrie 195 2008-02-05 15:18 classExamples/l8/makefile
    # -g allows gdb or ddd to display each line of execution
            gcc -g -o linked LinkedList.c
    
  2. Read Chapter 14, Section 14.1 (pp. 573-582)