0% found this document useful (0 votes)
90 views4 pages

Day 4 Task: Basic Linux Shell Scripting For Devops Engineers

Shell scripting allows developers to automate tasks by writing scripts that utilize shell commands. A shell script file uses the .sh extension and contains shell commands and programming constructs. The shebang line #!/bin/bash or #!/bin/sh specifies the shell interpreter to use. Example scripts take user input, compare values, and print output.

Uploaded by

sheak Imran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views4 pages

Day 4 Task: Basic Linux Shell Scripting For Devops Engineers

Shell scripting allows developers to automate tasks by writing scripts that utilize shell commands. A shell script file uses the .sh extension and contains shell commands and programming constructs. The shebang line #!/bin/bash or #!/bin/sh specifies the shell interpreter to use. Example scripts take user input, compare values, and print output.

Uploaded by

sheak Imran
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Day 4 Task: Basic Linux Shell Scripting for DevOps

Engineers.

What is Kernel :
The kernel is a computer program that is the core of a computer’s operating system, with
complete control over everything in the system.

What is Shell:
A shell is special user program which provide an interface to user to use operating system
services. Shell accept human readable commands from user and convert them into something
which kernel can understand. It is a command language interpreter that execute commands read
from input devices such as keyboards or from files. The shell gets started when the user logs in
or start the terminal.

What is Linux Shell Scripting:


A shell script is a computer program designed to be run by a linux shell, a command-line
interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical
operations performed by shell scripts include file manipulation, program execution, and printing
text.
Tasks:
I) Explain in your own words and examples, what is Shell Scripting for DevOps.
A Shell is an environment that interprets user request to run programs. A Shell Scripting
is a collection of shell commands and programming constructs, writing in a single file
with .sh extension.
To run this file use bash or sh environment.
bash Sample.sh

II) What is #!/bin/bash? can we write #!/bin/sh as well?


The shebang or bang line , #!/bin/bash or #!/bin/sh when used in scripts is used to instruct the operating
system to use bash or sh as a command interpreter.

III) Write a Shell Script which prints “I will complete #90DaysOofDevOps challenge”

IV) Write a Shell Script to take user input, input from arguments and print the
variables.
V) Write an Example of If else in Shell Scripting by comparing 2 numbers

You might also like