This course is designed to teach the concepts required to create Linux or Unix shell scripts. As well as being a useful course for all users of Linux, this course will be useful to anyone administering a Linux system or using Linux in a development.
At the end of the course the delegates should have an understanding of how Shell scripts work and be able to complete complex scripting tasks.
The course is based on the Bourne, Korn or Bash shell. For private classes the course content can be rearranged for the C-Shell if required.
As well as being a useful course for all users of Linux, this course will be useful to anyone who will be using Linux in a development environment or who will be administering a Linux system.
The course assumes that the delegate has prior knowledge of Linux or Unix to basic user level. Simple use of an editor would be an advantage.
Review the role of the Kernel and the Shell
Examine the process life cycle
- fork, exec
Examine in-built shell functions
Look at file name meta-characters
Perform I/O redirection using
- Standard out
- Standard in
- Standard error
- The tee command
Create simple scripts
- Run scripts
- Use of #! directive
Create and use shell variables
- Use of the export command
Use of the . construct
Use of quotes
- single, double, back quotes
Use of regular expressions including
- ^, $, \, , ., *
Use of positional parameters
- $0, $n $*, $@, $#
- The set command
Examine the exit status of commands
- The test command
Use of the if statement
- if , else, elif
Loops using Flow control
Reading data from standard input.
- Use of <<
Perform arithmetic calculations within a script
Examine the use of inbuilt functions
Look at Unix tools including
- awk, sed, cut, paste , tr, grep
Create command line scripts and menu driven interactive scripts.
Develop concise, robust and maintainable scripts.
Handle signals received by a script