CSE logo University of Washington Computer Science & Engineering
 CSE 374 Programming Concepts and Tools - Homework 1 - Spring 2009
  CSE Home   About Us    Search    Contact Info 

Due: Thursday, April 2, at 11 pm.

The main purpose of this first assignment is to learn your way around the Linux system you will be using during the quarter, and also to be sure that any problems setting up accounts or logging in are taken care of immediately.

  1. (Shell) You must be sure that your default shell is bash. Otherwise you will run into strange, baffling problems with shell scripts. Enter the command echo $SHELL. The response should be /bin/bash. If the shell name is different (csh, tcsh, or something else), use the appropriate commands on your system to change your login shell to bash. On many unix systems this can be done with the command chsh or ypchsh. If you are using the EE Linux machines, there is a separate web page to set your login shell - it's the same one you use to change your password.

  2. (Commands) First run the command script problem1 to capture your console session and store it in a file problem1. Then run at least 60 different commands using at least 15 different programs. Then run the exit command to terminate script.

    Your solution file may, of course, contain a few false starts and extraneous commands, but the file you turn in should have relatively little of this (i.e., the person reading your output shouldn't’t have to guess what is intended to be part of the solution your are submitting).

    Hint: look in the Unix Pocket Guide for ideas. Examples of the kinds of things you might explore: What is the absolute pathname of your home directory? What version of bash are you using? Where is the gcc command located? How much free disk space is available? What happens when you run cat? How do you copy, rename, or remove files? How do you change access permissions on files so other people can or can't read them? What do the different options on ls do? How do you print the date and time? What commands are stored in /usr/local/bin? What directories are on the execution path ($PATH variable)? ...

Assessment: Your solutions will be evaluated on how well they follow the instructions and produce the desired results.

Turn-in Instructions: Use the turn-in drop box link on the main course web page to turn the file created for problem 1. The drop box will allow you to turn in your homework up to two days late, if you choose to use one or two of your late days, but you are strongly advised to save your late days for later in the quarter when they may be much more useful.


CSE logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to Hal Perkins]