Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

FutureLearn

Introduction to Bash Script Automation

Packt via FutureLearn

Overview

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.

This course is designed for anyone interested in Bash shell scripting and developing key skills in automation.

Syllabus

  • Basic steps to write shell script, redirection operators and commands
    • Introduction to the course
    • Setting up your environment and installing Ubuntu
    • Writing shell script, general commands, configuring Gmail and Docker Installation
    • Redirection operators and commands to read file content
    • Grep command
    • Cut command, AWK command and other useful commands
    • Wrap up
  • Basic shell scripting, string operations, commands and arithmetic operators
    • Introduction to Week 2
    • Basics of shell scripting
    • Here string, writing comments and debugging
    • String operations and input and output commands
    • Arithmetic operators, case statements, test commands and command chaining
    • Wrap up
  • Conditional statements, scheduling jobs, arrays and loops
    • Introduction to Week 3
    • Conditional statements
    • Old and new test commands, conditional statements and command line arguments
    • Scheduling jobs
    • An introduction to arrays and loops
    • Loop control commands, statements, and for loop with arrays
    • Wrap up
  • Remote servers, loops, functions, printf command, and AWK command
    • Introduction to Week 4
    • Working with remote servers
    • Loops, loop control statements, and functions
    • Complete printf command and an introduction to the AWK command
    • Defining variables, reading variable values and more about the AWK command
    • Wrap up
  • Complete sed command and practical exercises
    • Introduction to Week 5
    • Complete sed command
    • Sed command with regex
    • Practice exercises part 1
    • Practice exercises part 2
    • Final week wrap up

Taught by

Astrid deRidder

Reviews

Start your review of Introduction to Bash Script Automation

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.