COMS 214 Advanced Unix, Spring 2006
MWF 12:20-13:10, 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 20 to March 17, 2006. The drop deadline is 2/27/06, one week
into the course.
To add the course (If you haven't done it already) you will need to go to the Enigineering
registrar take an add form then go to Upson 303 to get it aproved (stamped). The number of
the course is 676-729
Instructors
- Liviu Popescu
- Email: liviup@cs.cornell.edu
- Office: 4124 Upson Hall
- Office hours: Thursdays, 1:15 PM - 3:00 PM 4124 Upson Hall or by appointmentt
- Richard Yamada
- Email: yamada # cam.cornell.edu
- Office : 657 Rhodes Hall
- Office hours: Tuesdays, 1:15 PM - 3:00 PM 657 Rhodes Hall or by appointmentt
Grading and course policies
There will be 3 homeworks, and a passing grade will require doing all
homeworks and getting at least 65% of the total points. This means that, even
if you have less than half the points for one assignment, a good second
assignment would make things even. Assignments will involve answering short
questions, writing scripts, and solving more complex problems by building the
scripts step by step. All assignments should be done individually.
Please take a look at
Cornell University Code of Academic Integrity.
If you have questions of any kind,
you can talk to us during office hours. If you cannot come
during office hours, send me an e-mail and we will find time to talk to you.
You can also post your questions on the newsgroup cornell.class.cs214 (the
Cornell newsgroup server is newsstand.cit.cornell.edu).
Announcements
Most recent first:
- 3/24/2006: For those who submitted hardcopies hwk 2 will be available for pickup NEXT Friday (3/31) in Richard's 657 Rhodes Hall mailbox; if you have not submitted hardcopies, but emailed your assignment, I will have your numerical score available via email but no comments on the hwk.
- 3/09/2006: I (Richard) will have one more set of office hours (for last minute questions on the hwk) this Friday (3/10), 3:15 - 4:30 PM, 657 Rhodes Hall.
- 3/08/2006: I will be having office hours this afternoon, 4PM to 5PM. There was a small mistake with Problem 4; ignore all values that are equal to 'null', not 'nan' as was originally stated in the hwk. Also, for Problem 4, if you would like to do the majority of the problem in perl or python embedded in a shell script, or vice versa, feel free to do so.
- 3/07/2006:I (Richard) will be out of town starting this Sat. I will not have reliable access to my email until Tues afternoon; ergo if you have received an extension and have a question about a specific question on the hwk, you must ask me by Friday!
- 3/06/2006: Please refer to the lecture notes (if you are interested) for additional resources on makefiles. IF YOU NEED A CSUG ACCOUNT, EMAIL LIVIU POPESCU AT THE ADDRESS ABOVE ASAP!
- 3/03/2006: Office hours next week will be Tuesday instead of Thurs. Same place and hours. As stated in the hwk, extensions must be requested by Tues 3/7 by 5PM!! Also, access to the hwk files has now been fixed.
- 3/01/2006: Apologies for the mistake with the example during class concerning I/O redirection and subshells! Mistake was corrected in the notes.
- 2/27/2006: Homework 2 is now out. Due date will be 5PM Thurs March 9th.
- 2/18/2006: 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 2004, 2003 and 2002. 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. See also last
year's class webpage.
Lectures
- Lecture 1: Quick review: the Bash shell
- Lecture 2: Shell expansion and regular expressions
- Lecture 3: cron/read/arithmetic/positional parameters/command line (best to view the pdf with Xpdf or acroread, not ggv)
- Lecture 4: test/if/case commands
- Lecture 5: loops
- Lecture 6: functions
- Lecture 7: makefiles
- Lecture 8: Introduction to Perl: Handling Data in perl (variables, strings, numbers, file operators) and arrays
- Lecture 9: Regular expressions in Perl
- Lecture 10: Arrays
- Lecture 11: Perl functions
- Lecture 12: Miscellaneous
Homeworks
Resources
There are several places where you could work on Unix/Linux machunes
- CSUG lab 330 (4 Unix machines) and 361 (Windows machines you'll have to ssh)
- ACELL Lab in Carpenter library
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.
Miscellaneous
- One of the many links discussing scripting languages (WWW Journal, vol.2, spring '97)
- UNIX history as experienced by its creators: Dennis
Ritchie's
webpage
Sun Feb 19 17:52:19 EST 2006