Task-4 : Shell scripting and creation of basic shell scripting for if-else, loop and conditions Hands-on.
What is Kernel:-
The kernel is a computer program that is the core of a computer's OS, It is the portion of the operating system code that is always resident in memory and facilitates interactions between hardware and software components.
What is Shell:-
A shell is a special user program that provides an interface for the user to use operating system services. Shell accepts human-readable commands from a user and converts them into something which the 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 shell script is used to automate the task, it is a set of command lines written in a script from top to bottom. The user can automate the task by writing a set of commands/instruction which shell will understand and gives to the kernel.
What is
#!/bin/bash?
#!/usr/bin/bash is a shebang line used in script files to set bash, present in the '/bin' directory, as the default shell for executing commands present in the file. It defines an absolute path /usr/bin/bash to the Bash shell.
we can write #!bin/sh as well:-
Yes, Using #!/bin/sh as the first line means that the shell /bin/sh will execute this script when it is run by most shells. The #! is a convention recognized by nearly all UNIX and Linux shells, if not by all. If you use #!/bin/bash instead, then /bin/bash will execute the script.
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
-
Loop:-
-
Create a new folder and write content in that file and run it via shell script.
-
Thanks for taking the time to read the blog, Hope you find it useful.