Teaching‎ > ‎

CIT - 4613 Unix Programming

Quiz Marks
The marks of the quizzes are uploaded. 
View Download *
There were two quiz scripts where no student ID was written. If you think you are one of them, or you cannot find a quiz mark that you had actually attended, come to my room between 11.15-11.45 am on 26 September, Monday.
*The quiz marks will no longer be available in the website. If you have any query, please send me an email.

Viewing of mid-semester scripts
The scripts of mid-semester will be shown on Sunday, 11 September, at the class-time, followed by a discussion on the mistakes and solution. An (somewhat) elaborated solution of the mid-semester question is provided.  View Download

Lab viva and assignment
In the final weeks of the semester, you have to write a program that simulates the game of "Rock-paper-scissors". The description of the project can be found in the exercises part of chapter 12 of the Graham Glass book. It is also available as a text file here. You have to work in a group of three. You are expected to submit a finished product with appropriately documented source code and makefile. The tentative deadline for submitting the assignment is Thursday, 15 September 1 pm. You can use unnamed or named pipes or sockets to write the programs.

Submission Guideline: Each group has to send me the project by email. Please write the ID of the group members in the email. Attach a single zip/rar file only that should contain all the source code (.c files), makefile and the "Readme" file. I would only expect a single email from a group.

The scheduled dates for the viva: 15 September for group A and 20 September for group B (updated). It would be a group viva and the three  members of each group doing the assignment have to attend it together. The duration should be around 15 minutes for each group.

Quiz #4 Date Announced
The fourth quiz will be held on Sunday, September 18 at 12.10 am. The syllabus of the quiz is lectures 13 and 14.
Quiz 4 question: View Download

Quiz #3 Date Announced
The third quiz will be held on Wednesday, August 24 at 10.20 am. The syllabus of this quiz is lectures 10 and 12.
Quiz 3 question: View Download

Assignment topic and deadline 
Each of you have to submit an assignment on the topics(s): "gdb, tar and lint: How to use" by 12:00 pm, 16 August. The page limit is 2,1 and 1 pages respectively, for each part. The assignment should be typed in 12 size times new roman serif font. The subject material of the assignment will be included in your examination syllabus. So please make sure you understand what you are writing. Any kind of plagiarism and copying from sources without referencing would lead to substantial deduction of marks.

Mid-semester syllabus
The syllabus of the mid-semester is from lecture 2 to lecture 9, i.e. all the materials that are covered so far.
Mid-semester question:  View Download

Quiz #2 Date Announced
The second quiz will be held on Tuesday, July 5 at 2.00 pm. The syllabus of this quiz is lectures 6, 7 and 8.
Quiz 2 question:  View Download

Quiz #1 Date Announced
The first quiz will be held on Monday the 13th, at the class time (10.30 am). The syllabus is from lecture 2 to lecture 5.
Updated time: 2.00 pm on Tuesday the 14th. It will be an open book quiz.  
Quiz 1 question: View Download

Lecture slides in FTP server
For anyone within the campus (with the purported 1KB speed), all the materials will also be available in FTP server, in the folder named CIT-4613. You will also find some of the books uploaded there. 
Update:  It seems the files in FTP server tend to get deleted regularly due to space constraints. Hence, the availability of the lectures in FTP is not ensured. However, you can upload the materials to FTP yourself. 

Important announcement for Lab:
Unlike the first two weeks (where I practically guided you through all the new commands), you are supposed to be familiar with all the contents that are covered in the classes. In labs, your assignments will span the materials covered in the lectures and test your expertise on those. Please come prepared.

Lecture Slides

After Mid-term

Lecture 10 (24/07 - 28/07) - C programming in UNIX 
                                             gcc, make  (Chapter 12, Glass & Ables)
                                             gdb, tar, lint (Assignment)

Lecture 11 (31/07 - 10/08) - Programming in Perl. Reference - Introduction to Perl, attached as PDF in the reference section
                                             Introduction, Variables, Control Structures  View Download
                                             File handling, subroutines, regular expression   View Download
                                             Overview of discrete topics   View Download

Lecture 12 (14/08 - 17/08)   Processes in UNIX. View Download

Lecture 13 (21/08 - 22/08)   Introduction to UNIX I/O and Files (Updated) View Download

Lecture 14 (04/09 - 12/09)   Interprocess Communication
                                             Pipes   View Download
                                             Sockets  View Download

Lecture 15 (14/9 - 18/09)     Signals  View Download

Lecture 16 (21/09/11)          (A very brief intro to) System administration  View Download

Before Mid-term

Lecture 1 (22/05/11) - Course outline, administrative information, Reference materials View  Download

Lecture 2 (23/05/11) - A brief history of Unix and Linux View  Download

Lecture 3 (25/05/11) - Features of Unix View  Download

Lecture 4 (29/05 - 01/06) - Unix file system and utilities 
                                           Introduction View Download
                                           Viewing and manipulating files and directories View  Download
                                           Redirection, pipes, filters View  Download

Lecture 5 (05/06 - 08/06) -  File ownership and permission View Download
Lecture 6 (12/06 - 19/06) -  Regular Expressions
                                            Introduction View Download (This lecture is originally from Prof. Stuart Weiss of CUNY)
   Summary and examples View Download
Lecture 7 (20/06 - 26/06)
- Shell scripts
                                           Introduction, variables, loops  View Download     
                                           Control structure, Functions, Arrays  View Download

Lecture 8 (26/06 - 29/06) -  sed and awk
   sed View Download
                                            awk View Download

Lecture 9 (02/07 - 05/07)  - Remainders
                                            Processes ( Chapter 11 of Linux Command Line )
                                            find ( Pages 215 - 224 of Chapter 18 of Linux Command Line )
                                            cut, paste ( Pages 280 - 285 of Chapter 21 of Linux Command Line)

Reference Materials
  1. The Linux® Command Line, William E. Shotts, Jr. Download 
  2. Steve Parker's Bash scripting tutorial  Download
  3. sed tutorial from thegeekstuff.com  Download
  4. Introduction to Perl, Dr Guoping Qiu Download
  5. Unix Systems Programming: Communication, Concurrency and Threads Download