Course description
The Linux Bash Shell Programming course is designed to give delegates practical experience in developing and writing Bash shell scripts. Most of the built-in shell commands are introduced together with the main program control structures. The course also gives practical experience using a range of Linux tools to manipulate text and incorporate into Linux Bash shell scripts.
Exercises and examples are used throughout the course to give practical hands-on experience with the techniques covered.
Who will the Course Benefit?Programmers, developers and system administrators who need to construct shell scripts and process text files using advanced text handling facilities.
The Linux Bash Shell Programming course assumes knowledge of the Linux Operating System to the level covered in the Linux Introduction Course. Some programming experience may also prove advantageous.
Course ObjectivesTo provide the skills needed to develop and customise shell programs and to make effective use of a wide range of standard Linux programming and development tools.
Upcoming start dates
Suitability - Who should attend?
The Linux Bash Shell Programming course assumes knowledge of the Linux Operating System to the level covered in the Linux Introduction course. Some programming experience may also prove advantageous.
Experience to the level as demonstrated in this course is recommended:
- Linux Introduction
Training Course Content
Linux Bash Shell Programming Training Course
Course Contents - DAY 1
Course Introduction- Administration and Course Materials
- Course Structure and Agenda
- Delegate and Trainer Introductions
- Basic Unix commands
- General commands
- File and directory handling commands
- Filename generation characters
- I/O Redirection features
- Other commands
- What is a shell script?
- Development guidelines
- Creating and editing shell scripts
- Naming and storing shell scripts
- Executing shell scripts
- Exercise: Write a simple shell script
- Environment variables
- Local variables
- Assigning values to variables
- Assessing variable values
- Using quotes
- Delimiting variable names
- Echo control sequences
- Exercise: Add variables to a script
- Using the expr command
- Using the (( )) notation
- Exercises: Add integer arithmetic to a shell script
- The read command
- Command line arguments
- Exercise: Writing a generic shell script
- Exercise: Writing an interactive shell script
- The if statement
- The test command
- Exercise: Adding validation to previous scripts
- Other test notations
- Default and substitute variables
- Exit status codes
- Exercise
Course Contents - DAY 2
Session 8: LOOP CONSTRUCTS- The while loop
- The until loop
- The for loop
- The while true and until false loops
- Loop control commands
- Exercise: Enhancing the previously written scripts
- Exercise: Writing a script to copy files using a 'for' loop
- Exercise: Writing a script to generate numbers with the 'while' loop
- The case statement
- Menu driven applications
- Exercise: Developing and writing a menu system
- What is a function?
- Syntax
- Examples
- Creating a Function Library
- Exercise: Add a function to a script
- Interrupt signals
- Trapping interrupts
- Exercise: Adding traps to the menu script
- The exec commands
- The includes notation
- More about loops
- Arrays
- Here Documents
- Exercise: Create a here script
Course Contents - DAY 3
Session 13: BACKUP AND RESTORE UTILITIES- Backing-up and restoring files
- Basic and advanced use of tar
- Compression utilities gzip, bzip2, zip and compress
- Exercise: Backing up and restoring files using tar
- Exercises: Compressing files
- Scheduling jobs with the cron command
- Scheduling jobs with the at command
- Exercises: Running background jobs
- Compare files with the cmp command
- Compare and format files with pr
- Compare files with the comm command
- Compare files with the diff and sdiff commands
- Compare large files with the bdiff command
- Exercises: Identifying file differences
- The fold command
- Split files using context and content rules
- Exercises: Splitting files
Course Contents - DAY 4
Session 17: IDENTIFYING AND TRANSLATING CHARACTERS- od - octal dump
- Use cat to display non-printing characters
- View and format files with nl
- The expand and unexpand commands to convert between tab and space characters
- The tr command for character translation
- Exercises: Translating characters with tr
- Standard regular expressions
- Searching with grep
- Metacharacters, positional characters and quantifiers
- Extended regular expressions
- POSIX character classes
- PERL expressions
- sed command line syntax
- sed script files
- sed command processing
- sed addresses and simple instructions
- sed pattern space and hold space
- Grouping sed commands
- Hold and get functions
- Advanced flow control
- Write output to temporary files
- Exercises: Text processing with sed
- Basic AWK usage
- AWK program-files
- AWK scripts
- AWK variables
- Pattern matching with AWK
- AWK extended patterns
- AWK operators
- AWK arithmetic operations
- AWK output
- Formatting output with printf
- Exercises: Create awk scripts to extract selected data from a file and generate reports
Course Contents - DAY 5
Session 22: AWK PROGRAM CONTROL STRUCTURES- The BEGIN and END functions
- The AWK if construct
- The AWK else if construct
- The AWK while construct
- Other program control statements
- The AWK break, continue and exit statements
- User defined functions
- Exercises: Create AWK scripts and program-files utilising program control structures
- AWK string functions
- AWK length, tolower, toupper, index, sub, gsub, match, substr, split, sprintf, system and getline functions
- Exercises: Generate AWK scripts and program-files to extract and format data using AWK functions
- AWK associative arrays
- Multi-dimensional arrays
- Exercises: Create AWK associative arrays to process text files and generate reports
- bc (calculator)
- fuser (testing for files in use)
- getops (checking options passed to shell scripts)
- printf (formatting screen output)
- logger (script logging)
- xargs (generating arguments for a command)
- eval (re-evaluating variables)
- Exercises: Using tools within a shell script
Customer Outreach Award
We believe that it should be easy for you to find and compare training courses.
Our Customer Outreach Award is presented to trusted providers who are excellent at responding to enquiries, making your search quicker, more efficient and easier, too.
Reviews
Average rating 5
Continuing Studies
Further Learning
- Linux System Administration (LPI)
- Oracle SQL
Request info
Why StayAhead. From a single person on a scheduled course to large scale training projects StayAhead Training have the expertise and experience to help. Established since 1992, StayAhead Training is recognised as one of the leading independent IT Training specialists...
I've been on a number of other courses but I found Mark to be an exceptional instructor, spot on with his delivery I can't praise him enough. If only all institutors could be li...