Linux Shell Programming (Course 108 – 24 Hours)
Overview:
This course provides a comprehensive introduction to shell programming using the CShell (csh) and BASH shell (bash). A shell is a command-interpreting language used in UNIX, Linux, and Mac OS/X.
Course Objectives:
- Understanding different shells
- Learn how to use the interactive shell effectively
- Learn how to write shell scripts to automate tasks
Who Should Attend:
The course is designed for Linux users/programmers/administrators who want to master shell usage.
Prerequisites:
Students should have a basic knowledge in Linux.
Course Contents:
A Course Introduction
- Course Objectives
- Course Delivery
- Course Practical
- Course Structure
Shell Introduction
- What is a shell
- Different shells
- Bash
- Cshell
- Python
- More shells
- Redirection
- Pipes
Useful commands
- cut
- sort
- uniq
- grep
- history
- alias
- configuration files
- startup files
- wildcards
- which
- echo
- exec and job control
Variables
- overview
- assigning values
- arrays
- using the values
- built in and predefined variables
Writing scripts
- the path
- creating a simple scripts
- comments
- command line and parameters
- shift
- prompting
Conditions
- string tests
- if – else expression
- testing files
- and/or/not
- switch
Loops
- while loop
- for loop
- exit status
- arithmetic
Advanced option
- debugging scripts
- signals
- sub-scripts
- regular experssions
- sed
- awk