CS2044 (Advanced Unix Tools), Spring 2009
MWF 12:20-1:10 PM, Phillips Hall 213
Course description
A focus on GNU Linux/Unix as a programming environment
for people with a basic knowledge of Linux/Unix and experience programming in
at least one language. Projects cover advanced shell scripts (bash)
Makefiles, programming and debugging tools for C and other
languages, networking in Linux and network tools, and more modern scripting languages such as Perl and Python.
Students with little or no experience with Unix should take CS114
first.
CS214 is a four week, one credit, S/U only course. It runs
February 16 to March 13, 2008. The drop deadline is 2/23/08, one week
into the course. The course number is: 10831.
Instructor
- David Slater
- Email: David + cam.cornell.edu (replace + with @)
- Office hours: By Appointment Only
Grading and course policies
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.
There will be 3 homework assignments. 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:
- 2/16/2008: Please fill out and upload the questionnaire to CMS by friday!
- 1/21/2008: Welcome to Advanced UNIX! For those of you who
are curious to see what CS114 UNIX Tools covers, please
take a look at the web pages for 2007, 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 perhaps a little
Python.
Lectures
- 2/16/2009 Lecture 1 Unix Basics (all typos fixed hopefully)
- 2/18/2009 Lecture 2 Regular Expressions, Grep and Sed
- 2/20/2009 Lecture
3
Gawk and Conditionals, today we wrote a gawk script iouscript.gwk
to
parse a data file ioufile
(Latex typos fixed)
- 2/23/2009 Lecture
4 Loops - Today we looked at a script to check disk space remaining
spacetest.sh
and one that automatically creates thumbnails of JPEG pictures in a
folder thumbnails.sh
- 2/25/2009 Lectre 5 How the bash shell works and functions.
- 2/28/2009 In class programming contest. Final Standings. Problems.
- 3/2/2009 Lecture
6 Bash arrays and an introduction to make
- 3/5/2009 Lecture
7 Perl Basics
- 3/6/2009 Lecture
8 Perl Arrays and working with files.
- 3/9/2009 Lecture
9 Working with files in Perl and Associative Arrays
- 3/11/2009 Lecture
10 Perl Functions and an Intro to Python
Homework
- 2/16/2009 Questionnaire
Please complete the questionaire by class on friday and uplaod it and your script to CMS
- 2/20/2009
Homework
1 Due Feb 27th at 6pm on CMS. Here is a copy of Frankenstein
to test your script on. Note: There was a typo in the
example file1.txt for Problem 2. It should have read (607)
255-4321. This has been fixed on the version on the webpage
- 3/2/2009 Homework 2
Due March 9th at 11:59pm on CMS.
- 3/7/2009 Homework
3 Due Sunday March 15th at 11:59PM
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/12/2008: One of the many links discussing scripting languages (WWW Journal, vol.2, spring '97)
- 2/12/2008: UNIX history as experienced by its creators: Dennis
Ritchie's
webpage