Day 4 Task: Basic Linux Shell Scripting for DevOps Engineers.

What is Kernel?

It is the core of the operating system. It is a computer program that manages the hardware system. It can communicate directly with hardware, memory and processor.

What is Shell?

It is a command line interface by which users can communicate with Karnal and it can communicate with the hardware. It is an interface between users and hardware. The User instruct to karnal to write commands on the shell to compute and get output from the system.

What is Linux Shell Scripting?

It is comprised of some elements by which to avoid repetitive work. It is the scripting language on the shell by which the user will give write commands as input to get output like print something or comparing values.

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

The shebang, #!/bin/bash when used in scripts is used to instruct the operating system to use bash as a command interpreter. Each of the systems has its own shells which the system will use to execute its own system scripts. #!/bin/sh used in scripts instructs the internal system shell to start interpreting scripts.

\>> Write a Shell Script which prints I will complete #90DaysOofDevOps challenge

Output

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

  • Output

  • \>> Write an Example of If else in Shell Scripting by comparing 2 numbers

    • Output