Description
In this course, you will learn:
- Learn how to use bash scripting to automate common tasks on Red Hat Enterprise Linux (RHEL)—one of the most popular Linux distributions
- Learn how to get data out of bash scripts and set up conditional and looping code blocks
Syllabus:
- Introduction
- Bash scripting for automation
- What you will need
1. Introduction to Linux Scripting
- Introduction to bash
- What makes a shell script a shell script?
- Using bash debugging mode
- Bash variable scope
2. Using Outside Data in a Script
- Positional arguments
- Load files using while read
- Load files into arrays with mapfile
- Prompt for input
- Pipe data into a script
- Process shell options
- cript
- Saving data to files
- Outputting to STDOUT and STDERR
4. Bash Logic
- Conditional flow with if, then fi
- Conditional flow with case
- Numeric conditions
- String conditions
- File conditions
5. Bash Loops
- For loop
- While loop
- 6. Real-World Examples
- Monitoring userspace usage
- Monitoring CPU usage