COMS 214 (Advanced Unix Tools), Spring 2007
MWF 12:20-1:10 PM, Olin Hall 245
Course description
A focus on Unix as a programming environment
for people with a basic knowledge of Unix and experience programming in
at least one language. Projects cover advanced shell scripts (sh, ksh,
csh), Makefiles, programming and debugging tools for C and other
languages, and more modern scripting languages such as Perl and Python.
Students with little or no experience with Unix should take COM S 114
first.
COMS 214 is a four week, one credit, S/U only course. It runs
February 19 to March 16, 2007. The drop deadline is 2/26/07, one week
into the course. The course # is: 342-623. To add this course (if you have not
done so already), you will need to go to the Engineering School Registrar, take
an add form, go to Upson 303 and get the form stamped.
Instructor
- Richard Yamada
- Email: yamada + cam.cornell.edu (replace + with @)
- Office hours: By Appointment Only
Grading and course policies
Detailed information about the course can be
found here Course Information. There will be no official textbook for this course; below you may find some books and websites that might be helpful. There are many books on this subject, so pick your favorite one. Feel free to contact me if you have any questions about this course.
Briefly, there will be 2 homework assignments, a midterm exam,
and a final project. You must complete all these assignments to
pass this class. Please take a look at
Cornell University Code of Academic Integrity. Please
follow these guidelines when submitting your work.
Announcements
Most recent first:
- 4/14/07: The course has now ended; I will not be accepting any more late assignments. This entry
will be the last one for this course. Have a great rest of the spring semester. It has been my pleasure teaching you all.
- 3/26/07: Projects are due today, unless you asked for an extension. PLEASE NOTE, all class notes, scripts, etc
will be unavailable after March 31st. ALSO, assignment 2 solutions are now available for a limited time. PLEASE EMAIL ME
BY 4/13/2007 IF YOU WANT A COPY OF THESE SOLUTIONS.
- 3/16/07: The course has now finished; I hope you learned something useful from this course!!! Lecture 7 notes had some mistakes which I have now corrected. **ALSO** I mentioned in class today that all notes, scripts, etc will be coming off the website
at the end of March. If you would like a copy, please send me an email. Unless you asked for an extension, hwk 2 is due today
at 5PM, and the project is due on 3/26/07. Have a good spring break.
- 3/14/07: Friday's class will be in ACCEL Orange Room; I will lecture for the first 35 minutes or so on Makefiles, followed by a
very short exercise.
- 3/12/07: Weds class will be in ACCEL Orange Room. Midterms have been graded and were handed back in class today. If you would like your
midterm, you can either pick them up in lab Weds or email me with a particular day/time.
- 3/10/07: DUE DEADLINE FOR HWK2 HAS BEEN EXTENDED TO 3/16/2007, not 3/14/2007.
- 3/9/07: HWK2 Prob 5 HINT: You may want to go to www.cpan.org and download the modules 'finance quote' and 'TableExtract'. These modules may make your life considerably easier!
- 3/9/07: We will be in class (OH 245) today; Next Monday we will also be in class.
- 3/2/07: ACCEL staff is looking into the internet problems that we had in class today. With regards to the exercises,
and as a hint and to get you started, I've put up an 'outline' code for 'getstock' and 'portfolio' on the course website next to the lab exercise. In the main body
of the code, replace each commented line with the actual Linux command(s). If you have a good idea of how to attack these
exercises, there is no need to look at these outline files; you can proceed as you like!
- 2/28/07: Friday's class will be in the ACCEL Orange Room as scheduled. Hopefully ACCEL will have corrected the problem from last lab. I'm
keeping my fingers crossed :). Also, assignment 2 is now on the web, and is due Weds March 14th.
- 2/26/07: There was a mistake on problem 4; after you=$LOGNAME there should be another line, hour=$( date +%H )
- 2/23/07: I've asked the ACCEL people to fix the 'Linux access' problem we had during Lab by next Friday. Thanks
for being patient and doing the exercises via PuTTY. If you did not finish, please take the time and do them
on your own. We will discuss solutions in lecture next week during class. Monday's class will be in
Olin Hall 245.
- 2/21/07: CSUG accounts should now be available to those who signed up this past Monday. Please be
reminded that Friday's class will be in the ACCEL ORANGE ROOM.
- 2/17/07: For those who signed up for this course, accounts have been requested for the CSUGLab.
You should be able to log in shortly. If you signed up for the course, and an account was not created for you, please contact me ASAP. Users with new accounts need to reset their passwords
here. Here you can find information about
how to connect to the UNIX host of your choosing.
If you want to connect to babbage from outside the CSUG lab, you need to use ssh. PuTTY is a reasonable ssh client for Windows, if you need one.
- 2/16/2007: Welcome to Advanced UNIX! For those of you who
are curious to see what COMS 114 UNIX Tools covers, please
take a look at the web pages for 2006, 2005 and 2004. In
the Advanced UNIX class you will study shell scripting in more
detail, and become familiar with writing scripts to automate everyday
tasks. The goal of this class is for you to become familiar with
writing scripts and gain experience by means of examples. We will cover bash
scripting, basic programming using Perl, and makefiles.
Lectures and Schedule
Tentatively, there will be a combination of
lectures and labs. Labs, in lieu of class, will
be held in the ACCEL lab (Orange Room) in Carpenter Hall. The
link to ACCEL, along with directions to find this computer lab, can be found here.
This proposed schedule may change, so please
refer to this website. Also, after each lecture,
I will announce what I plan to do for the next lecture (lab or lecture).
- Lecture 1: Scripting and the Bash Shell
- Lecture 2: Conditionals (if and case)
- Lab #1 Exercises
- Lecture 3: Loops (while, for, until)
- Lecture 4: Functions
- Lab #2 Exercises, getstock, portfolio
- Below, to help with your midterm, I have also put the cs214 lectures from 2005:
- Bash shell, Shell expansion and regular expressions, Conditionals, Loops, and Functions
- Lecture 5: Introduction to Perl
- Introduction to Perl Scripting (CS 214 2005 lectures)
- Lecture 6: Perl, part 2
- Lab #3 Exercises
- Lecture 7: Makefiles, Makefile file, dummy LaTex file
Homeworks
- Homework 1. Hand out: Mon 2/19/07. Due: 5 PM Weds 2/28/07.
- Homework 2. Hand out: Weds 2/28/07. Due: 5 PM Fri 3/16/07. SEE THE 3/9/2007 HINT FOR PROBLEM 5!
- Midterm. Hand out: Tues 3/6/07 5 PM. Due: 5 PM Weds 3/7/07. (NOTE: HARD COPIES WILL ALSO BE AVAILABLE IN MY MAILBOX IN RHODES 657, IN CASE LINK DOES NOT WORK)
- Final Project. Hand out: Mon 3/12/07. Due: Mon 3/26/07. Test DNA sequence
Very Useful links
- UNIX shells and scripts
- Perl
Useful books
- UNIX Shells by Example (2nd ed), E. Quigley,
Prentice
Hall,2000
- excellent presentation of all five
leading UNIX shells: C, Bourne, Korn, Bash, and tcsh; also covers three
main utilities in UNIX: grep (for searching), sed (for editing), and
awk (for scripting).
- UNIX in a Nutshell, A. Robbins, O'Reilly, 1999
- good general reference, contains alphabetized listing
of
core UNIX commands, and documentation on editors like Emacs, ex and vi,
among others
- Programming Perl (3rd ed), L. Wall, T.
Christiansen,
and
J. Orwant, O'Reilly, 2000
- the standard introduction to Perl
- Mastering Regular Expressions, J. Fried, O'Reilly,
1997
- in-depth presentation of the use of regular expressions
for
manipulating text and data; a special chapter is dedicated to Perl
All books are optional, but highly recommended if you plan to do serious shell/perl scripting.
Miscellaneous
- 2/16/2007: One of the many links discussing scripting languages (WWW Journal, vol.2, spring '97)
- 2/16/2007: UNIX history as experienced by its creators: Dennis
Ritchie's
webpage