Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers.

Course Content:

Lesson:-1 Introduction to Bash Shell Scripting.

Lesson:-2 Bash Shell Scripting Using Comments and Variables.

Lesson:-3 Bash Shell Scripting using Read Operator in Shell Scripts.

IMP We are Dividing the Terminal in 2 Parts Right Side Script Execution and Left Side Write a bash file with Syntax.

Lesson:-1 Introduction to Bash Shell Scripting.

Shell Scripting:-

A Shell Scripting is a basic program which we are written our commands and Interpret which are input form the user and give the output.It is used to Automate our Process. In our Linux default /bin/bash shell we are using. But we are using different shells in our Shell Scripting. you can direct execute the script do not compile the Script.

Practical Part

Present shell in our Linux.

How to change the shell.

Total shells in our Linux

How to change the shell Diagram

How to check the shell level

How to check the shell level Diagram

How to change the shell

How to change the shell Diagram.

Binary file Available of Shell

Binary file Available of Shell Diagram.

Lets us discuss with help of Practical.

How to print the Value

How to print the Value Diagram

Single Quote in Shell Script as a ties print

Single Quote in Shell Script as a ties print Diagram

Double Quote in Shell Script print the value

Double Quote in Shell Script print the value Diagram

Topic

Echo Command with backspace Character in Shell Script.

Echo Command with backspace Character in Shell Script Diagram

For New Line Print

echo -e Welcome to Shell Scripting Tutorials \nLesson1

echo -e Welcome to Shell Scripting Tutorials \nLesson1 Diagram.

For tab Space in Lines

echo -e Welcome to Shell Scripting tutorials \tLesson1 (For tab Space)

echo -e "Welcome to Shell Scripting \nTutorials" Diagram.

Now Move one step forward write a Shell Script.

Now Move one step forward write a Shell Script.
Script File Syntax Diagram

Lesson:-2 Bash Shell Scripting Using Comments and Variables.

In Lesson 2 we will discuss the Comments, Variables and Dollar Sign

Comments and Variables.

Comments:-

#Sign(Pound sign) will be ignore by the shell it is used only for the Understanding shell do not read the #Comments.

#sign Practical on Normal Terminal

#sign Practical on Normal Terminal Diagram.

#sign Practical on File Terminal

#sign Practical on File Terminal Diagram.

Variables:

Variable is Container in which can store our value if we required in the shell we will call. Variable value can be changed. In our Shell Scripting 2 types of Variables we are using for Ex:-

1 System Variable

It is a Permanent Variables which are Developed by the Developer in our machine ant its value can not be changed. It is fixed it is Pre-Defined.

How to check the System Variables in our Linux. It is in the capital letters. Variable is a case sensitive

How to check the System Variables in our Linux

How to check the total No of System variable in our System.

How to check the total No of System variable in our System another way.

How to check the total No of System variable in our System another way.

2 User Defined Variables:

Variables which are not fixed and we can change the value as per our need and save it into the variable and its defined in the shell if you are not export.

User defined variable are not start with Number like (123) you can used after

Let's discuss the Variables with the help of Practical

Let's discuss the Variables with the help of Practical Diagram.
Let's discuss the Variables with the help of Practical

For Better Knowledge we will write a Script of System variable in the single file and Execute.

I Have used the 2 Terminals for theses Script (Right Side Execution the Script and Left Side Write a Script with Code.)

I Have used the 2 Terminals for theses Script (Right Side Execution the Script and Left Side Write a Script with Code.) Diagram

For Better Knowledge we will write a Script of User variable in the single file and Execute.

I Have used the 2 Terminals for theses Script (Right Side Execution the Script and Left Side Write a Script with Code.)

For Better Knowledge we will write a Script of User variable in the single file and Execute Diagram

export:-

Export is used to set your variable Permanent in shell Scripting. you can set your variable on 2 types:

1 Entry on Terminal and we will check with in different-2 shells.

Export is used to set your variable Permanent in shell Scripting. you can set your variable on 2 types: Diagram

Lesson:-3 Bash Shell Scripting using Read Operator in Shell Scripts.

Read Operator:-

Take input form the user and store in the variable with the help of Read Operator. in these lecture we will use the Read Operator.

Let us discuss with the help of Single Input.

I Have used the 2 Terminals for theses Script (Right Side Execution the Script and Left Side Write a Script with Code.)

let us discuss with the help of Single Input Read Operator Diagram.

Let us discuss with the help of Multiple Inputs from the user.

In Multiple operators we will use the 4 names and execute the names.

Let us discuss with the help of Multiple Inputs from the user Diagram.

To take the input form the user in same line

To take the input form the user in same line Diagram.

To take the input form the user Silent with read operator.

To take the input form the user Silent with read operator Diagram.

Array:-

To take the multiple inputs form the user you do not know how much inputs the user will be given and it stored on a single Array.

To take the multiple inputs form the user you do not know how much inputs the user will be given and it stored on a single Array Diagram.

Hope I helped you in understanding the concept in a better way!!

Happy Learning !!

shubhlaxmi shukla

CKA certified | REDHAT OPENSTACK Certified |GCP-Associate cloud engineer certified| Docker | kubernetes | AzureDevOps | AWS | Linux | ansible | cicd | jenkins | terraform | Grafana | GIT |GITHUB

1y

Good Initiative!!Maninder Singh

Maninder Singh

AWS || Huawei || Cloud || Docker || Mentor & Tutor || System Engineer Antier Solution

1y

++

Like
Reply

To view or add a comment, sign in

Insights from the community

Explore topics