In Unix, the Command Shell is a command interpreter. It provides a command line interface for the users to interact with the operating system.
Unix commands may also be executed non-interactively in the form of a Shell Script. The script is a series of commands that will be run together. Shell scripts can be used for a variety of tasks from customizing the Operating System’s environment to automating various daily maintenance tasks.
Course Details
1. INTRODUCTION TO SHELL
- Login process
- Types of shell
- The expr command
- Environment variables
- Shell script
- Exit statement
- break AND continue
- Exit status of the last command- the $?
2. SHELL PROGRAMMING
- Shell Scripts
- read : Making scripts Interactive
- Using command line Arguments
- exit and Exit status of command
- The logical Operators && and | | – Conditional Execution
- The if Conditional
- Using test and [ ] to Evaluate Expressions
- The case Conditional
- expr : Computation and String Handling
- $0 : Calling a Script by Different Names
- while : Looping
- for : Looping with a list
- set and shift : Manipulating the Positional Parameters
- The Here Document
- trap : Interrupting a Program
- Debugging shell Scripts with set –X
- Sample validation and Data Entry Scripts
3. ADVANCED SHELL PROGRAMMING (OVERVIEW)
- Shells and Sub-Shells
- ( ) and { }: Sub-Shell or Current Shell?
- export : Exporting Shell Variables
- Running Script in the current shell : The . command
- let : Computation-A Second Look (Korn and Bash)
- Arrays (Korn and Bash)
- String Handling (Korn and Bash)
- Conditional Parameter Substitution
- Merging Streams
- Shell Functions
- eval : Evaluating Twice
- The exec statement