Bash Shell Scripting in 4 Hours
Published by Pearson
Get started with Bash
- Learn bash scripting basics quickly
- Engage with bash through lab assignments
- Explore code from real scripts
Bash is used as the default shell on Linux and UNIX and is also available on Mac OS systems around the globe. Bash is a fast and efficient way to execute commands in your daily work. It’s powerful, not particularly complex, and simple to learn. In this course, students will learn the essentials for Bash shell scripting. To make this course as practical as possible, it will analyze a few real-life shell scripts, allowing you to immediately apply the acquired knowledge. Based on that, you’ll learn how to write your first bash script, use variables, conditionals and more. This 4-hour class is a great way to learn the skills needed to interpret Bash shell scripts and how to develop new ones. Get up and running today.
What you’ll learn and how you can apply it
By the end of the live online course, you’ll understand:
- How to use standard components to write bash scripts
- How to make scripts faster
- How to debug scripts when they don’t work as expected
And you’ll be able to:
- Write scripts to automate common tasks
- Use internal and external bash commands to write efficient scripts
- Understand the code in any shell script
This live event is for you because...
- This training provides real skills in bash shell scripts, allowing attendees to automate tasks for data analysis, devops and more
Prerequisites
- Basic knowledge or experience with the Linux or MacOS command line is required
Course Set-up
- Attendees are expected to bring an environment that offers a bash shell. This can be a Linux or Mac OS terminal or Windows Subsystem for Linux
Recommended Preparation
- Watch: Linux Fundamentals, 2nd Edition by Sander van Vugt
- Attend: Learn Linux in 3 hours by Sander van Vugt
- Attend: Linux Fundamentals Bootcamp by Sander van Vugt
- Watch: If you need more information on creating a virtual machine, consult my video course Virtualization for Everyone
Recommended Follow-up
- Watch: Bash Shell Scripting, 2nd Edition by Sander van Vugt
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Segment 1: Introducing the Sample Shell Script
Length: 15 minutes
- Understanding script flow and elements
Segment 2: Writing a shell script with basic elements
Length: 25 minutes
- Summarizing key Linux skills
- Writing readable scripts
- Common best practices
- Running your script
- Using internal and external commands.
10-minute break
Segment 2: Working with Variables
Length: 40 minutes
- Understanding Variables
- Including variables in shell configuration files
- Working with here documents
- Sourcing variables
- Interactively providing variables with read
10-minute break
Segment 3: Using Positional Parameters
Length: 40 minutes
- Processing command line arguments
- Using shift
- Using while, $* and $@.
Segment 4: Applying Pattern Matching substitution
Length: 30 minutes
- Modifying strings with pattern matching substitution
- Modifying strings with tr, awk and sed
10-minute break
Segment 5: Using conditional structures
Length: 50 minutes
- Using if then else
- Using logical operators && and ||
- Using while and until
- Using for and case.
Q&A Length: 10 minutes
Your Instructor
Sander van Vugt
Sander van Vugt has many years of experience working with, writing about, and teaching Linux and Open Source topics. He is the author of the best-selling Red Hat RHCSA Cert Guide and the Red Hat RHCSA Complete Video Course along with many other titles on topics that include RHCE, Bash, Kubernetes, Ansible and more. Sander also works as a Linux instructor, teaching on-site and online classes for customers around the world.