π§ What is Kernel?
The kernel serves as the heart of a computer's operating system, holding complete control over all system components. It is a vital computer program with immense authority.
π» What is Shell?
A shell acts as a specialized user program that offers an interface for users to interact with operating system services. It translates human-readable commands into instructions understood by the kernel. When users login or start the terminal, the shell springs into action.
π What is Linux Shell Scripting?
Linux shell scripting involves creating computer programs meant to be executed by a Linux shell, which is a command-line interpreter. These scripts are considered scripting languages and are employed for tasks like file manipulation, program execution, and text output.
π»π Shell Scripting Tasks
ππ Explain in your own words & examples, what is Shell Scripting for DevOps.
- If you wish to automate a process, you must write a series of instructions in the form of commands that will be executed step by step to carry out a specific action. For instance, if you want to run the 'echo' command five times with different arguments each time, you can achieve this through a Shell Scripting file(β.shβ extension), this script file contains the commands necessary to perform the desired tasks in an automated manner.
π€What is
#!/bin/bash?
can we write#!/bin/sh
as well?- The term "shebang" refers to "#!/bin/bash," which is placed at the beginning of a shell script to specify the interpreter to be used for executing the script. The shebang indicates whether to use "sh (Bourne Shell)" or "bash (Bourne Again Shell)" as the interpreter, and they are two distinct flavors for running scripts. Currently, bash is widely used as it is an enhanced version of sh, incorporating additional features and functionalities.
πWrite a Shell Script that prints
I will complete #90DaysOofDevOps
challenge
ππ― Write a Shell Script to take user input, input from arguments and print the variables.
π Write an Example of If else in Shell Scripting by βοΈ comparing 2 numbers.