P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Exam Revision Ruibin Bai (Room AB326) Division of Computer Science The University of Nottingham.

Slides:



Advertisements
Similar presentations
Introduction to Unix – CS 21 Lecture 11. Lecture Overview Shell Programming Variable Discussion Command line parameters Arithmetic Discussion Control.
Advertisements

ISBN Regular expressions Mastering Regular Expressions by Jeffrey E. F. Friedl –(on reserve.
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
CS 497C – Introduction to UNIX Lecture 33: - Shell Programming Chin-Chih Chang
23-Jun-15Advanced Programming Spring 2002 bash Henning Schulzrinne Department of Computer Science Columbia University.
COMP2004 Programming Practice Sam Holden Department of Computer Science University of Sydney.
AWK: The Duct Tape of Computer Science Research Tim Sherwood UC San Diego.
Guide To UNIX Using Linux Third Edition
Guide To UNIX Using Linux Third Edition
Introduction to Unix (CA263) Introduction to Shell Script Programming By Tariq Ibn Aziz.
Shell Script Examples.
Lecture 8  make. Overview: Development process  Creation of source files (.c,.h,.cpp)  Compilation (e.g. *.c  *.o) and linking  Running and testing.
Shell Scripting Awk (part1) Awk Programming Language standard unix language that is geared for text processing and creating formatted reports but it.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
Introduction to Shell Script Programming
1 Operating Systems Lecture 3 Shell Scripts. 2 Shell Programming 1.Shell scripts must be marked as executable: chmod a+x myScript 2. Use # to start a.
8 Shell Programming Mauro Jaskelioff. Introduction Environment variables –How to use and assign them –Your PATH variable Introduction to shell programming.
REVIEW 2 Exam History of Computers 1. CPU stands for _______________________. a. Counter productive units b. Central processing unit c. Copper.
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
CST8177 bash Scripting Chapters 13 and 14 in Quigley's "UNIX Shells by Example"
C Programming n General Information on C n Data Types n Arithmetic Operators n Relational Operators n if, if-else, for, while by Kulapan Waranyuwat.
Programming Languages Meeting 13 December 2/3, 2014.
Shell Script Programming. 2 Using UNIX Shell Scripts Unlike high-level language programs, shell scripts do not have to be converted into machine language.
Additional UNIX Commands. 222 Lecture Overview  Multiple commands and job control  More useful UNIX utilities.
Writing Shell Scripts ─ part 3 CSE 2031 Fall October 2015.
Linux Operations and Administration
UNIX Shell Script (1) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Shell Programming. Introducing UNIX Shells  Shell is also a programming language and provides various features like variables, branching, looping and.
Introduction to Awk Awk is a convenient and expressive programming language that can be applied to a wide variety of computing and data manipulation tasks.
Programmable Text Processing with awk Lecturer: Prof. Andrzej (AJ) Bieszczad Phone: “UNIX for Programmers and Users”
Awk Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Introduction to Unix – CS 21 Lecture 12. Lecture Overview A few more bash programming tricks The here document Trapping signals in bash cut and tr sed.
Perl: Lecture 1 The language. What Perl is Merger of Unix tools – Very popular under UNIX – shell, sed, awk Programming language – C syntax Scripting.
13 More Advanced Awk Mauro Jaskelioff (originally by Gail Hopkins)
Lecture 24CS311 – Operating Systems 1 1 CS311 – Lecture 24 Outline Final Exam Study Guide Note: These lecture notes are not intended replace your notes.
Revision Lecture Mauro Jaskelioff. AWK Program Structure AWK programs consists of patterns and procedures Pattern_1 { Procedure_1} Pattern_2 { Procedure_2}
1 P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Awk Programming (2) Ruibin Bai (Room AB326) Division of Computer Science The University.
Shell Advanced Features. Module 8 Shell Advanced Features ♦ Introduction In Linux systems, the shells are often referred to as command line interfaces.
Final Exam Review May 3 rd, 2004 Class Meeting 15.
1 P51UST: Unix and Software Tools Unix and Software Tools (P51UST) More Shell Programming Ruibin Bai (Room AB326) Division of Computer Science The University.
Xuan Guo Chapter 5 The Bourne Shell Graham Glass and King Ables, UNIX for Programmers and Users, Third Edition, Pearson Prentice Hall, Notes by Michael.
1 Lecture 9 Shell Programming – Command substitution Regular expressions and grep Use of exit, for loop and expr commands COP 3353 Introduction to UNIX.
CSCI 330 UNIX and Network Programming Unit IX: Shell Scripts.
CSCI 330 UNIX and Network Programming
 2003 Prentice Hall, Inc. All rights reserved. 1 IS 0020 Program Design and Software Tools Preprocessor Midterm Review Lecture 7 Feb 17, 2004.
P51UST: Unix and SoftwareTools Unix and Software Tools (P51UST) Version Control Systems Ruibin Bai (Room AB326) Division of Computer Science The University.
Just a Little PHP Programming PHP on the Server. Common Programming Language Features Comments Data Types Variable Declarations Expressions Flow of Control.
1 P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Awk Programming Ruibin Bai (Room AB326) Division of Computer Science The University.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Awk Programming (3) Ruibin Bai (Room AB326) Division of Computer Science The University.
Week Five Agenda Link of the week Review week four lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Week Four Agenda Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
UNIX Shell Script (2) Dr. Tran, Van Hoai Faculty of Computer Science and Engineering HCMC Uni. of Technology
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
1 Lecture 10 Introduction to AWK COP 3344 Introduction to UNIX.
CSCI 330 UNIX and Network Programming Unit IX: awk II.
CS 403: Programming Languages Lecture 20 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
1 Lecture 7 Introduction to Shell Scripts COP 3353 Introduction to UNIX.
By Dr P.Padmanabham Professor (CSE)&Director Bharat Institute of Engineering &Technology Hyderabad Mobile
Awk- An Advanced Filter by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
Programming Languages Meeting 12 November 18/19, 2014.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
Shell Scripting March 1st, 2004 Class Meeting 7.
IOS110 Final Review.
Writing Shell Scripts ─ part 3
Writing Shell Scripts ─ part 3
What is Bash Shell Scripting?
Midterm Exam Preperation
Computer Programming 1 introduction to JAVA Lecture 1 Instructor: Ruba A. Salamah Islamic University of Gaza.
Programming Languages
Review The Unix Shells Graham Glass and King Ables,
Presentation transcript:

P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Exam Revision Ruibin Bai (Room AB326) Division of Computer Science The University of Nottingham Ningbo, China

Exam Format Final mark for the module is the weighted sum of your mid-term exam mark (25%) and the end-term exam mark (75%). Remember shell and awk syntax – you will need to write some short programs/scipts

About End-Term Exam Time: 1 Hour and Half FIVE questions, answer ALL of them!! Can be divided into two parts –Part I: drawn from the first six-week lectures, 30 points. –Part II: From the second six-week lecturers, 70 points 3 P51UST: Unix and SoftwareTools

Main Topics for the End-Term Exam Unix System, file system, processes, Regular expressions –Mid-term exam questions Shell programming –Coursework 1 Awk programming –Coursework 2 Version control Compilers, interpreters, debuggers Makefile Review lecture slides for all the above topics

Shell Programming Environment variables –PATH A list of ‘:’ separated directories that the system searches to execute commands Modify your PATH variable The order of the directories matters!!! – why? –TERM The type of terminal –Home Home directory –To find other environment variables, use env

Shell Programming Special variables VariableContents $#Number of command-line arguments $*All of the command-line parameters or agurments in one long string of the command-line parameters or arguments as individual strings. $0Script name $1-$9The first nine command-line arguments or parameters. $?The return status of the most recently executed command. 0: success, 1: fail $$The process ID of the current process $!The process ID of the last background command

Shell Programming String quoting –Three different methods –Be able to choose appropriate ones Input/output –read, echo, printf –Be able to use them confidently Flow-control –Conditionals ( Test file conditions, String/number comparisons) –Loops Arithmetic Review coursework 1 and work on other exercises

Awk Programming What is awk and what does awk do? Awk syntax and options Awk variables –FS, OFS, RS, NR, NF –$0, $1, $2, … (different from those in shell programming) Pattern-action pairs Special patterns: BEGIN and END and their usage

AWK Programming Awk commands –Input/output: print, printf, getline, read from a pipeline –system Loops and conditionals Arrays –Assignment –Use String operations –length, index, substr, split Functions

A Summary of Awk Functions TypeFunction or commands Arithmeticexpintsqrtsincos randsrandlogatan2 Stringasortasortigsubindexlength splitsubstrtolowertoupper Control Flowif/elsedo/whileforbreakcontinue breakreturn I/Oprintprintfgetlinenextnextfile closefflush Programmingsystemdeletefunction 10 P51UST: Unix and SoftwareTools

Version Control System Purposes Locking based vs Version tracking based –Conflict resolve –Advantages and disadvantages

Compilers, Interpreters and Debuggers Compiler vs Interpreters –How is a program translated and executed using each translation technique? –Advantages and disadvantages Debuggers –print –Debugging tools Interpretive vs Direct Execution

Makefile Basics –Purposes –Targets, prerequisites, actions Principles and syntax Be able to write simple makefiles –Use of macros –Use of common Automatic variables

Finally Practice, practice, practice! Got questions? – me, or Thomas –come to my office (AB326) or Thomas’s (AB324) and…. Good luck!!!