Audience
This course is designed for UNIX application users. It is also designed for programmers, systems alanlysts and engineers involved in the development of software for a UNIX system.
Topics
Unit 1: Creating a Simple Shell Script
- Introduction
- The Shell as a Programming Language
- Creating Shell Scripts
- Some Basics
- Input and Output Redirection
- Scripts vs Compiled Programs
- Shell Script Examples
- More about Running Scripts
Unit 2: Filename Generation & Quoting
- Introduction
- Metacharacters
- Filename Generation Characters
- Filename Generation
- Quoting
- The Comment Character
Unit 3: Using Shell Variables in Scripts
- Introduction
- Creating and Referencing Variables
- Executing Files
- An Example Process Hierarchy
- visibility of Shell Variables
- The Environment of a Process
Unit 4: Input for Shell Scripts<
Objectives
Upon completion of this course, the student will be able to:
Create and run shell scripts Redirect standard input, standard output and standard error Quote metacharacters when they are to be included in arguments Use filename generation metacharacters Use shell variables and the export command Write scripts that accept command line arguments Use the read command to obtain input for a script Use command substitution Retrieve the exit status of the previous command Test properties of files and strings by using the test commant Use the case command and the various forms of the if command Use for loops, while loops, and until loops Use the set command to display the values of all sell variables Use the set command to set shell options such as -x and -v Use the set command to change the values of the positional parameters Use the exit command to cause a script to