Complete Bash Shell Scripting B

Automate repetitive tasks with Bash Shell Scripting to save valuable time

Last updated 2022-01-10 | 4.6

- Students will be able to understand shell scripting concepts
- Students will be able to understand unix filters like awk
- cut and sed
- This course is helpful to Automate repetitive tasks in different Admin areas like Linux Admins
- Middleware Admins
- Database Admins
- DevOps Admin and AWS Cloud Admins

What you'll learn

Students will be able to understand shell scripting concepts
Students will be able to understand unix filters like awk
cut and sed
This course is helpful to Automate repetitive tasks in different Admin areas like Linux Admins
Middleware Admins
Database Admins
DevOps Admin and AWS Cloud Admins
This course is helpful to write basic to advance level shell scripts

* Requirements

* Need minimum knowledge on Unix/Linux Commands
* Desire to learn shell scripting
* Any Unix-Like OS running on Physical Machine or Virtual Machine or Virtual Machine from Any Cloud Provider

Description

This unique course is designed to become an expert in bash shell scripting to automate repetitive tasks.

As we know that most of the organizations are moving into Linux and Unix operating system as its generally open source. Additionally, Linux, Unix skills gained by developers would make them more in demand.

From a developer perspective, this course not only cover command line commands, but also Bash shell scripting to make you comprehensive developer expert in Linux \ Unix OS.


The topic covered are as follows:

  • How to write shell scripts from basic to advanced level

  • What is the shebang line and why every shell script need ones.

  • How to create and use variables

  • Testing and Decision Making

  • Command line arguments

  • Input and output

  • Conditional Statements

  • Exit status

  • filters like grep, awk, cut and sed

  • Functions

  • Wildcards

  • Loops

  • Case statements

  • Logging

  • Debugging tips

  • Bash Shell Options

  • Working with remote servers

  • Practice on each topic

Happy learning!!

Who this course is for:

  • Beginner Level to Advanced Level Automation Enginners with Bash Shell Scripting

Course content

23 sections • 95 lectures

Introduction to Course Preview 17:32

Environment Setup to Practice Bash Shell Scripting Preview 01:59

Installing Ubuntu on Windows 10 Preview 10:42

Basic Steps to Write and Execute a Shell Script Preview 11:38

List of General Purpose Commands and Help to Understand about the usage of a com Preview 02:03

Configuring Gmail Setup on Ubuntu Server Preview 06:10

Simple Basic Quiz

Docker Installation on Ubuntu Server using Bash Shell Script Preview 06:06

Redirection Operators and STDIN, STDOUT & STDERR Preview 15:18

Commands to read a file content Preview 04:13

Commands to read a file content with conditions Preview 04:57

How to display or print range of lines ? Preview 02:28

Basic usage of grep command Preview 17:32

Advanced Usage of Grep Command Preview 26:29

Simple Practice with grep command Preview 05:42

Complete cut command in one video Preview 19:21

Basics of AWK Command to write simple Shell Scripts Preview 19:28

First HelloWorld Bash Shell Script | Simple Usage of echo command Preview 05:10

Introduction to variables Preview 14:49

Simple Shell Script to know the usage of Variables in Bash Shell Scripting Preview 07:28

Advanced Usage of echo command Preview 09:44

Here Document for Multi-lines or Multi-line block Preview 07:13

Here String Usage Preview 04:57

Writing Comments for a Shell Script Preview 06:20

what is #!/usr/bin/env bash ? Preview 04:53

Debugging a Bash Shell Script Preview 14:53

Exit Status of a Command Preview 05:40

Basic String operations Preview 11:24

String Operations on Paths | Useful for Real-time Preview 04:58

input with read command and output with echo command Preview 06:44

Input with command line arguments Preview 08:51

test command and its usage | Comparison and file test operators Preview 08:32

Command Chaining using Logical AND (&&) and Logical OR (||) Operators Preview 09:37

Executing block of code using {} Preview 11:18

simple if and if-else conditional statement Preview 13:29

Simple Shell Script to verify the user is root or not and User is having sudo Preview 10:47

Shell Script to start docker service Preview 13:32

Logical AND OR and NOT operators - ( &&, || and ! ) Preview 14:31

Differences between [ ] and [[ ]] ( old and new test command) and also (( )) Preview 12:05

if elif elif else conditional statement Preview 09:41

How to handle command line arguments ? Preview 11:07

One time task execution with at | scheduling job with at command to execute once Preview 05:06

Scheduling jobs with crontab Preview 16:30

Shell Script to send Automatic Mail Alert when RAM Memory gets Low Preview 09:58

Shell Script to monitor File System Utilization with mail alerts Preview 11:48

Introduction to Loops Preview 20:59

Different types of for loop syntax's Preview 17:44

Installing multiple packages with for loop and command line arguments Preview 24:23

Difference between $@ and $* Preview 06:07

Loop Control commands / statements Preview 19:02

For loop with arrays Preview 11:52

Login into remote server from local server using ssh Preview 14:35

Executing commands on remote server without logging into remote server Preview 11:02

Providing password for ssh using sshpass utility Preview 07:45

Executing multiple commands on Multiple servers Preview 14:39

Shell Script to execute different commands on different servers Preview 13:00

Simple Introduction to Functions Preview 06:33

Defining a Function and Calling a Function Preview 09:14

Scope of the Variables (Global and Local Variables), Returning a variable value Preview 19:44

Passing Parameters to a Function Preview 07:35

Introduction to awk Preview 12:06

awk command with action and bacis variables Preview 15:13

Note: $0 means entire record

awk '{ print $0 }' filename


action that is print $0  means display each and every line or record

Introduction to awk scripting Preview 12:59

awk command with options, action and basic variables Preview 09:56

Simple Hello World awk script Preview 05:34

How to define a variable , display a variable and execute multiple statements ? Preview 08:09

awk command or awk script: Reading variable values from command line Preview 16:36

How to use awk command / script in shell scripts ? Preview 07:37

How to read variables for awk command using shell script ? Preview 12:34

Desing Arithmetic calculator with shell script using awk command Preview 00:04

Introduction to sed command Preview 07:39

Usage of sed command is: 


Viewing file content

Searching

find and replace

insertion or deletion


sed also supports regular expression which allows it perform complex pattern matching.

sed: Viewing file content and deleting file content based on line numbers Preview 16:41

Note: we can use either "  " or '  ' quotes in sed command. But there is a small difference between double and single quotes, will discuss while going forward.

sed ' ' file.txt

sed 'p' file.txt

sed -n 'p' file.txt

sed -n '3p' file.txt

sed -n '7p' file.txt

sed -n '9p' file.txt

sed -n '$p' file.txt

cat file.txt

sed -n '$p' file.txt

sed -n '3,10p' file.txt

sed -n '10,12p' file.txt

sed -n '30,$p' file.txt

sed -n '12,+7p' file.txt


sed -n '1~3p' file.txt

sed -n '1~2p' file.txt

sed -n 'p' file.txt

sed '49d' file.txt

sed '4,$d' file.txt

sed '10,45d' file.txt

sed '10,+12d' file.txt

====================================


sed -i '10,$d' file.txt

sed -i.back '3,$d' file.txt

===================================

Searching file content Preview 09:20

Find and replace with sed command Preview 13:21

sed  's/old/new/'  file   --> the first occured old word will be replacing with new word on each and every line.

sed  's/old/new/g' file   --> replace all old words with new word on each and every line

sed 's/old/new/2'  file   --> replaces second occured old word with new word

sed '/search/s/old/new/g'  --> replaces the old word with new word if that line consist of seach word


Insertion and Deletion with sed command Preview 10:00

Regex: Introduction to sed command with regex Preview 04:25

Regex-Part-1: Regex with special characters (\s \t . * \+ \? and \) Preview 12:52

Regex-Part-2: Regex with special characters ( ^ and $ ) Preview 07:11

Regex-Part-3: Regex with special characters ( [] () and {} ) Preview 15:32

Simple shell script to get all git versions from official git-scm website Preview 44:00

This script is using the concept of wget to download a page , and sed for matching , awk to get fields , cut to get required characters and finally array to store all values.

Shell script to get all git versions using functions concept Preview 01:07

Design simple Digital Clock with Bash Shell Scripting Preview 09:44

Automate Server Inventory using Shell Script Preview 12:50

Automate Multiple Servers Inventory using Shell Script Preview 42:07

Monitor File system usage and send mail alerts Preview 25:07

Automate the installation of required git version using bash shell script Preview 22:24

Script will list all available git versions from git official website and it will check for git version on host if not then it will say fist time installation or if git is present then it will ask required upgrade git version and after reading the version number then script will install git or upgrade the git.