Table of contents
- Kernel-
- Shell-
- Shell Scripting-
- What is #!/bin/bash? can we write #!/bin/sh as well?
- #Write a Shell Script which 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 number num1 -eq num2 check if 1st number is equal to 2nd number
- By using user inputs-
Kernel-
Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls.
Kernel loads first into memory when an operating system is loaded and remains into memory until operating system is shut down again. It is responsible for various tasks such as disk management, task management, and memory management.
Shell-
A shell is special user program which provide an interface to user to use operating system services. Shell accept human readable commands from user and convert them into something which kernel can understand. It is a command language interpreter that execute commands read from input devices such as keyboards or from files. The shell gets started when the user logs in or start the terminal.
Shell Scripting-
Shell scripting languages can be used for multiple purposes such as automating repetitive tasks, backup and maintenance of databases, monitoring a system, creating a programming environment, linking existing programs together, and various other tasks. So, first of all, let us try to understand what exactly a Linux shell is.
What is #!/bin/bash?
can we write #!/bin/sh
as well?
!#/bin/bash is the most common shell used as default shell for user login of the linux system. The shell’s name is an acronym for Bourne-again shell. Bash can execute the vast majority of scripts and thus is widely used because it has more features, is well developed and better syntax.
The #!/bin/sh line tells the system that the commands in the scripts are going to be executed by the Bourne Shell (bash).
#!/bin/sh :Executes the script using the Bourne shell or a compatible shell, with path /bin/sh
#!/bin/bash :Executes the script using the Bash shell.
Note:#!/bin/bash we can write as #!/bin/sh as both act as same bash has more featured and better syntax.
#Write a Shell Script which 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 number num1 -eq num2 check if 1st number is equal to 2nd number
num1 -ge num2 checks if 1st number is greater than or equal to 2nd number
num1 -gt num2 checks if 1st number is greater than 2nd number
num1 -le num2 checks if 1st number is less than or equal to 2nd number
num1 -lt num2 checks if 1st number is less than 2nd number
num1 -ne num2 checks if 1st number is not equal to 2nd number
By using user inputs-
Thank you for reading!! Hope you find this helpful.
#day04challenge#90daysofdevops
Always open for suggestions..!!
Thankyou Shubham Londhe !!