Book Image

Complete Bash Shell Scripting [Video]

By : VR Technologies
Book Image

Complete Bash Shell Scripting [Video]

By: VR Technologies

Overview of this book

Many organizations favor Bash scripts for executing shell commands, running and customizing administrative tasks, automating repetitive tasks, and performing many more Linux and Unix functions. Having Bash scripting skills will make you stand out from your peers and help you advance in your automation career. With this course, you will learn Bash shell scripting in detail and understand how to apply the acquired skills confidently in the real world. Starting with an introduction to Bash shell scripting, the course takes you through the process of installing Ubuntu on Windows 10. You will also learn to install Docker on a Ubuntu server and understand the basic steps to write and execute shell scripts. Once you have become familiar with redirection operators and explored commands such as grep, cut, awk, tr, and tee, you will write a simple script to get to grips with using the echo command, variables, strings, comments, and debugging. The course also covers input and output commands, arithmetic operators, conditional statements, arrays, and loops, and demonstrates how to schedule jobs. You will work with remote servers, functions, the printf command, and the sed command and discover what awk scripting is. Finally, you will put your knowledge to practice by designing a simple digital clock and automating multiple server inventory using shell scripts. By the end of this course, you will have become well-versed in Bash shell scripting and developed the skills to automate repetitive tasks. All the codes and supporting files for this course are available at: https://github.com/PacktPublishing/Complete-Bash-Shell-Scripting-
Table of Contents (23 chapters)
7
Simple Useful Commands for Shell Scripting
9
String Operations to Write Bash Shell Scripting
15
Arrays of Bash Shell Scripting
18
Loops and Loop Control Statements - Part 2
20
Complete Printf Command
Chapter 19
Linux Functions
Content Locked
Section 3
Scope of the Variables (Global and Local Variables) and Returning a Variable Value
This video shows how to define the scope of a variable and return its value.