Day 04 - 90DaysOfDevOps
What is Kernel
The Linux kernel is the foundation of the Linux computer operating system. A kernel is the lowest level of software that can interface with computer hardware. All Linux applications and servers also interface with the Linux kernel.
What is Shell
A shell is a software program used to interpret commands that are input via a command-line interface, enabling users to interact with a computer by giving it instructions.
What is Linux Shell Scripting?
Usually shells are interactive that mean, they accept command as input from users and execute them. However some time we want to execute a bunch of commands routinely, so we have type in all commands each time in terminal.
As shell can also take commands as input from file we can write these commands in a file and can execute them in shell to avoid this repetitive work. These files are called Shell Scripts or Shell Programs. Shell scripts are similar to the batch file in MS-DOS. Each shell script is saved with .sh file extension eg. myscript.sh
What is #!/bin/bash?
can we write #!/bin/sh
as well?
#!/bin/bash is called shebang, which is being used in script files to set bash which is present in /usr/bin/bash .This is used to set the default shell for executing commands present in the file.
As long as we refer to sh features only we can use #!/bin/sh
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 numbers.
Thank you for visiting my Blog. Please leave a comment or feedback for the article.