Introduction to Bash Script Automation

Hone your Bash scripting skills to help you automate repetitive tasks and boost productivity with this practical online course from the experts at Packt.

Duration

5 weeks

Weekly study

3 hours

100% online

How it works

Unlimited subscription

Learn more

Gain a solid understanding of Bash shell scripting

Many organisations favour Bash scripts for executing shell commands and automating repetitive tasks. Therefore, Bash scripting skills are highly sought-after and can help you advance your automation career.

On this five-week course, you’ll learn Bash shell scripting in detail and understand how to apply the acquired skills confidently in the real world.

You’ll start with introductory topics and finish with a practical exercise of designing a simple digital clock and automating multiple server inventory using shell scripts.

Explore test command and arithmetic operators

You’ll become familiar with arithmetic and redirection operators and explore different commands, including test and grep.

Next, you’ll write a simple script to get to grips with using functions such as echo command, variables, strings, comments, and debugging.

Delve into arrays

You’ll explore more advanced topics such as conditional statements and loops before putting your knowledge into practice and demonstrating how to schedule jobs.

Then, you’ll gain an introduction to arrays and in particular, arrays of Bash shell scripting. With this knowledge, you’ll be able to use arrays as a tool to store multiple pieces of the same type of data.

Understand SED command

In order to master server management, you’ll learn how to log into the remote server from the local server using ssh. Within this, you’ll also learn how to use a shell script to execute commands on different servers.

Finally, you’ll explore SED (stream editor) to understand how to use it as a powerful tool to filter or transform text.

By the end of the course, you’ll have become well-versed in Bash shell scripting and developed the skills to automate repetitive tasks.

  • Week 1

    Basic steps to write shell script, redirection operators and commands

    • Introduction to the course

      Welcome to Introduction to Bash Script Automation and the start of your learning journey, brought to you by Packt.

    • Setting up your environment and installing Ubuntu

      In this activity, we will explore setting up your environment to practice bash shell scripting and install Ubuntu on Windows 10.

    • Writing shell script, general commands, configuring Gmail and Docker Installation

      In this activity, we will discuss the basic steps to write and execute a shell script. We will also learn about general commands, configuring Gmail and installing Docker on an Ubuntu server.

    • Redirection operators and commands to read file content

      In this activity, we will discuss redirection operators and commands to read the content of a file.

    • Grep command

      In this activity, we will discuss the basic and advanced usage of the grep command.

    • Cut command, AWK command and other useful commands

      In this activity, we will discuss the cut command, the AWK command as well as other simple, but useful commands for bash shell scripting.

    • Wrap up

      You have reached the end of Week 1. In this activity, you'll reflect on what you have learned.

  • Week 2

    Basic shell scripting, string operations, commands and arithmetic operators

    • Introduction to Week 2

      Welcome to Week 2. In this activity we'll highlight the main topics that will be covered this week.

    • Basics of shell scripting

      In this activity, we will discuss the echo command and variables.

    • Here string, writing comments and debugging

      In this activity, we will discuss here string. You’ll also learn about writing comments and debugging bash shell script.

    • String operations and input and output commands

      In this activity, we will discuss basic string operations as well as input and output commands for bash shell scripting.

    • Arithmetic operators, case statements, test commands and command chaining

      In this activity, we will discuss arithmetic operators, and the usage of case statements, test commands and command chaining.

    • Wrap up

      You have reached the end of Week 2. In this activity, you'll reflect on what you have learned.

  • Week 3

    Conditional statements, scheduling jobs, arrays and loops

    • Introduction to Week 3

      Welcome to Week 3. In this activity we'll highlight the main topics that will be covered this week.

    • Conditional statements

      In this activity, we will discuss simple if and if-else conditional statements. We’ll also explore verifying the user is root or not, starting Docker service and using logical AND, OR and NOT operators.

    • Old and new test commands, conditional statements and command line arguments

      In this activity, we will discuss the differences between old and new test commands. We’ll also explore conditional statements and command line arguments.

    • Scheduling jobs

      In this activity, we will discuss scheduling jobs with at and crontab.

    • An introduction to arrays and loops

      In this activity, we will discuss arrays, associative arrays and loops.

    • Loop control commands, statements, and for loop with arrays

      In this activity, we will discuss the difference between $@ and $*, loop control commands, or statements, as well as For loop with arrays.

    • Wrap up

      You have reached the end of Week 3. In this activity, you'll reflect on what you have learned.

  • Week 4

    Remote servers, loops, functions, printf command, and AWK command

    • Introduction to Week 4

      Welcome to Week 4. In this activity we'll highlight the main topics that will be covered this week.

    • Working with remote servers

      In this activity, we will discuss working with remote servers.

    • Loops, loop control statements, and functions

      In this activity, we will discuss loops, loop control statements, and functions.

    • Complete printf command and an introduction to the AWK command

      In this activity, we will discuss the printf command and start exploring the AWK command.

    • Defining variables, reading variable values and more about the AWK command

      In this activity, we will discuss defining variables, displaying variables, and executing multiple statements. You’ll also discover more about reading variable values and using the AWK command.

    • Wrap up

      You have reached the end of Week 4. In this activity, you'll reflect on what you have learned.

  • Week 5

    Complete sed command and practical exercises

    • Introduction to Week 5

      Welcome to Week 5. In this activity we'll highlight the main topics that will be covered this week.

    • Complete sed command

      In this activity, we will discuss complete sed command, viewing and searching file content as well as finding and replacing with sed command.

    • Sed command with regex

      In this activity, we will discuss sed command with regex, specifically deep-diving in regex with special characters.

    • Practice exercises part 1

      In this activity, we will practice how to design a simple digital clock, how to automate server inventory and how to automate the inventories of multiple servers.

    • Practice exercises part 2

      In this activity, we will practice how to monitor file system usage and how to automate the installation of required git versions.

    • Final week wrap up

      You have reached the end of this course. In this activity, you will reflect on what you have learned.

More courses you might like

Learners who joined this course have also enjoyed these courses.

©2025  onlincourse.com. All rights reserved