# Basic Linux Shell Scripting

### 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 a special user program that provides an interface for users to use operating system services. Shell accepts human-readable commands from a user and converts them into something which kernel can understand. It is a command language interpreter that executes 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.

### What is #!/bin/bash?

This is the first line from bash scripts. The name of this line is: she-bang‘(shabang), hashbang. This derives from the concatenation of two tokens, sharp(#) and bang (!). This combination of tokens will be present at the beginning of a script. It will specify which specific interpreter should be used to execute commands.

### Can we write #!/bin/sh as well?

Yes, #!/bin/sh can be used as well instead of #!/bin/bash.

### Write a Shell Script that prints I will complete #90DaysOofDevOps challenge?

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102201819/1e274d0c-1d96-4b23-815f-6d0d4762bc5f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102232353/14b4f716-f63e-4555-88e6-1ed1ef49d3c9.png align="center")

### Write a Shell Script to take user input, input from arguments and print the variables.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102526821/8a4605a9-0b04-481d-8956-6ae160b46a46.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102500277/e3c93aba-a663-492b-b89e-ef59d3dbe129.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102650101/31465940-7b94-4ae2-a5d6-26f38e78ff15.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102683734/8d114024-2921-4640-8342-eaa6315e1221.png align="center")

### An Example of If else in Shell Scripting by comparing 2 numbers

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102972488/5d9e8bd7-9539-44c0-885a-af5e7d78c14e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680102998231/fc9d49f1-9503-47c2-b1f0-7031304881d1.png align="center")

Thank you for reading.

Bikram Chatterjee
