COP 3344-01 Introduction to Unix: Lecture 5

Learning objectives

After this class, you should be able to:

  1. Write simple shell scripts that use the Bourne shell, and run them. In particular, you should be able to use the following features: (i) use command line arguments, (ii) define and use variables, (iii) run a command and assign its output to a variable, (iv) use set to redefine the command line arguments, (v) write comments, and (vi) read input using read.
  2. Use the following Unix commands: echo and expr.
  3. Use quoting rules to enable or disable the special meaning of special characters.

Reading assignment

  1. JEA: Chapters 10.12, 33.1-33.10, Single Unix Specification for definitions of the commands.
  2. Lecture slides: Lecture 5.

Exercises and review questions


Last modified: 1 Oct 2007