Learn how to use bash scripting to automate common tasks on Linux.
Overview
Syllabus
Introduction
- Bash scripting for automation
- What you will need
- Introduction to bash
- What makes a shell script a shell script?
- Using bash debugging mode
- Bash variable scope
- Positional arguments
- Load files using while read
- Load files into arrays with mapfile
- Prompt for input
- Pipe data into a script
- Process shell options
- Saving data to files
- Outputting to STDOUT and STDERR
- Conditional flow with if, then fi
- Conditional flow with case
- Numeric conditions
- String conditions
- File conditions
- For loop
- While loop
- Monitoring user space usage
- Monitoring CPU usage
- Next steps
Taught by
Grant McWilliams