Articles

Home / Articles / DevOps / What is Shell Scripting?

What is Shell Scripting?

Published on Oct. 11, 2021

A shell script is a computer program designed to be run by the Unix/Linux shell. While working towards automation, shell scripting plays a vital role. In brief, we write some lines of codes and run that script in the UNIX/Linux shell and that script does all the tasks on its own. 

 

Table of content

 

What is Shell?

A shell is an interface that takes some commands as input and provides the output. It is like a live interpreter that is executed one by one. We provide a command to it, it runs, provides the output to us, again we run a command and it executes that.

 

Shell is an environment in which we can run our commands, program, and scripts. There are different types of shell similar to OS that has different flavors. Each type of shell has its own commands to perform some actions.

 

What is Shell Scripting?

Shell scripting is a script of commands that are written to do some specific task inside an OS. Like another programming language, it has some concepts like variables, loops, and conditions, etc.

 

This is a sample of the shell script

 

#!/bin/sh
# printing hello world
echo "Hello World!"

 

Types of Shell Script

There are mainly four types of shell script:

 

The original Unix shell was written in the mid-1970s by Stephen R. Bourne while he was at the AT&T Bell Labs in New Jersey.

 

Bourne shell was the first shell to appear on Unix systems, thus it is referred to as "the shell".

 

Bourne again shell is known as bash shell and in this series, we will talk about this scripting shell.

 

Benefits of shell scripting

While configuring a system or multiple systems it is a tedious task to run each and every commands to fulfill the requirements. To overcome this issue we use shell scripting. There are the following benefits of shell scripting

 

Final Voice

In this lecture, we have learned about the introduction of shell scripting, types, and benefits. In case you want to learn more about shell scripting bookmark to BrighterBees.

 

Connect with the author on Twitter.

···