· Why Use Scripts, How Scripts Help in improving efficiency, and automation.
· Introduction to Shell
· Shell internal and external commands
· Return codes
· How Shell Works
· Types of shells available in UNIX systems
· Anatomy of a Shell Script
· Commands, variables, and control structures.
Module 2: Writing First Shell Program
· Three steps of creating and executing shell scripts (script file, permissions, execution)
· Comments and order of execution
· Sub shells and scope of variables
· Creating and exiting of sub shells.
· Ways to Execute a Shell Script
· Using Quotes and Special Characters
· Background and Foreground Processes
· Shell Environment Files
· Changing and Switching Shells
· Common Pitfalls of Shell Programmers
Module 3: I/O Redirection and Pipes
· Standard Input, Output, and Error redirection
· Pipes and filters
o cut
· SED and AWK
· Reading and writing to files
Module 4: Working with variables in shell scripts
· Why use variables
· Creating and using variables
· Special variables
· Taking arguments from command line
· Environment variables
Module 5: Conditions, Arithmetic and String Comparison
· Multiple ways for testing conditions
· Arithmetic and String comparisons
· Logical operators
Module 6: Flow Control Structures
· The if-else class of flow controls
· The for loop
· The case structure
· The while and until loops
· Select statement
· Exiting a control structure
· Nesting
Module 7: Advanced Operations, Arrays and Lists
· Creating arrays and lists
· Indexes
· Using arrays in control structures and loops
· Array elements count, length
· Searching and replacing
· Adding and removing array elements
· Copying arrays
· Reading files
Module 8: Using Functions
· Simple functions
· Parameters
· Exit codes
· Return
Module 9: Script Debugging
· Debugging the whole scripts with –x
· Debugging parts of script with “set –x” and “set +x” within script.
· Using bashdb debugger (bash –debugger <script> or bashdb <script>