4.67 out of 5
4.67
9 reviews on Udemy

Complete Bash Shell Scripting

Automate repetitive tasks with Bash Shell Scripting
Instructor:
Narendra P
61 students enrolled
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
Students will be able to understand shell scripting concepts
Students will be able to write basic to advance level shell scripts

This Course helps you to Automate repetitive tasks with bash shell scripting. We created this course concept wise and with real-time examples.

After completion of this course you will be able to write low-level to high level shell scripts for real-time tasks.

The focus points of this course are:

    1. Different ways to provide input for shell script ?

    2. Detail explanation about command line arguments.

    3. Detail explanation about Functions

    4. Mail alerts for Monitoring RAM Usage, CPU Usage etc…

    5. Working with remote servers using ssh and exception handling for ssh

    6. Logging concepts

Introduction

1
Introduction to Automation with Bash Shell Scripitng
2
Basics steps to write and execute bash shell scripting with an example
3
Running user defined shell script as a command

Variables and complete echo command

1
simple shell script to display "Welcome to shell scripting "

It will explain about: simple echo command and echo usage with single, double quotations and without quotations

2
Concepts of Variables

It will explain about:  

    what is a variable ?

    How to display variable value ?

    Default value of a variable ?

    Different Types of Variables

    How to store different types of data into a varialbe

    Rules to define variable names

3
Stroing output of a command into a varaible and into a file

It will explain about:

    Difference between storing output into a variable and into a file

4
Different Types of Variables

It will explain about:

    Different types of variables like user defined variables, system defined variable and special variables

5
complete echo command and escaped characters

Input and output Commands

1
Input and output commands of shell scripting

It will explain about input and output commands of a shell scripting with an example

2
Complete read command

Here, you will get:

How to read a value ?

Default variable name for read command ?

How to set default value for a variable ?

How to set timeout for read command ?

How to read multiple values ?

How to read password ?

Arithemetic operators of Shell Scripting

1
Arithemetic oprators with explanation
2
Menu driven Arithemetic calculator

Complete printf command

1
Introduction to printf command
2
Printf command to print variable value and also for mutliple variables
3
Modifiers fof format specifiers of printf command

Usage of Special Variables with an Example

1
Introduction to special variables
2
Providing input for shell script wiht command line arguments

String Operations

1
Minumum required string operations for real time

my_str="Shell Scripting"

echo $my_str

echo "$my_str"

echo "${my_str}"

----------------------------

concatination of strings:

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

str1="shell"

str2="scripting"

str3="$str1 $str2"

-----------------------------------

Find the length of a strings?


echo "${str1}"

echo "The len of ${str1} : ${#str1}"

echo "${#str3}"

storing the len of string into a variable:

-------------------------------------------

st3_len=$(echo "${#str3}")

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

Conveting lower <==> upper:

  to upper: echo "${str1^^}"

  to lower: echo "${str1,,}"

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

String operations on index values

my_str="Shell Scripting"

echo "${my_str:position}  --> display from given position to last char

echo "${my_str:position:len}" --> display from given position to the no of chars based on len

---------------------------------------------------------------------------------------------


2
String operations on paths

Deleting sub string matching:

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

path_tom="/tmp/apache-tomcat-8.7.0.tar.gz"

echo "${path_tom%tar.gz}" --> at the end matched sub string deletion

echo "${path_tom#/tmp}"    --> at the starting matched sub string deltetion

-------------------------------------------------------------------------

echo "${path_tom%.*}"

echo "${path_tom%%.*}"

echo "${path_tom#*.}"

echo "${path_tom##*.}"

-----------------------------------------

Conditional statements and Operators for Conditional statements

1
What is Conditional statement and why conditional statements are required ?
2
Different Types of Conditional statements

Here, you will learn about if condition and their types.

Already we discussed about case statements in our previous section with an example of menu driven calculator

3
Different Types of operators for if Decision Control Statements

Loops and Loop control statements

1
Introduction to loops
2
Generate sequence of Numbers
3
Working with for loop
4
Working with while loop
5
Working with until loop
6
Working with select loop
7
Loop Control commands / statements
8
Guess my number Game
9
Difference between $@ and $*

Prompt Environment Variables

1
Different Types of Prompt Environment Variables
2
PS1 Prompt Environment Variable
3
PS2 Prompt Environment Variable
4
PS3 Prompt Environment Variable
5
PROMPT_COMMAND Prompt Environment Variable

Working with Text and CSV Files

1
Working with Text and CSV Files

Redirection Operators and File Descriptors(FD)

1
Basics of Redirection and File Descriptors

How to store output of a command into a file ?

--------------------------------------------------------------------

ls > my_out.txt   ( new file is create with data as your cmd output)

date >> my_out.txt (the current date is appendedto old file if file is exist

                    else ew file is create with data as your cmd outpt)

----------------------------------------------------------------------------

cat < my_out.txt (it provides input for cat command)

-----------------------------------------------------------

Input Redirection symbol is: <

output redirection sybols is: > and >>

------------------------------------------


File Descriptors: FD

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

Note: FD,we have to use with redirection symbols


0 --> STDIN

1 --> STDOUT

2 --> STDERR

-----------------------------

2
Permanent Redirections

Arrays

1
Basics of arrays

Define an array:

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

x=(5 4 6 2 "shell" 3 "shell scripting")

Display an entire array:'

   echo "${x[@]}"

   echo "${x[*]}"

------------------------------------------

Get Array values based index:

   echo "${x[5]}"

Get range of array values:

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


echo "${x[@]:2"   --> This will display index 2 to last values

echo "${x[@]:2:3}"  --> This will display index 2 and from there three values

-----------------------------------------------------------

Get the length of an array:

  x=(5 4 6 2 "shell" 3 "shell scripting")

  echo "${#x[@]}"



Get he length of particalur index value

echo "${#x[4]}"


------------------------------------------------

2
Add an element or value to an array and Remove value from an array
3
Reading array values with loop
4
creating an array using commands

Functions

1
Basics Concept for Functions: Executing shell script from another shell script
2
Introduction to Functions
3
Working with Functions
4
Return codes for Functions
5
Scope of the variables

Working with Remote Servers from Local server

1
Executing Basic commands on remote server from local server
2
SSH Default user and Working with different remote users
3
Executing Multiple Commands on remote server
4
Execute a command on remote server without providing password of remote user
5
Using sshpass together with ssh to execute commands on remote server
6
Different ways to provide password for sshpass command to work with ssh command
7
Minimu requrired Options for ssh to execute commands on remote server
8
Capturing SSH output as variable

PART-1: Real Time Practice (Low Level To High Level )

1
Design simple Digital Clock with Bash Shell Scripting
2
Shell Script to Send Email Alert When Memory Gets Low
3
Automate Server Inventory using Shell Script
4
Automate Multiple Servers Inventory using Shell Script

Working with Root / Sudo

1
Running shell script with root user or with sudo privilages
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.7
4.7 out of 5
9 Ratings

Detailed Rating

Stars 5
7
Stars 4
1
Stars 3
1
Stars 2
0
Stars 1
1
b7503e2469c52b3dc6eda53c9692a027
30-Day Money-Back Guarantee

Includes

13 hours on-demand video
Full lifetime access
Access on mobile and TV
Certificate of Completion