What is Kernel
The kernel is a computer program that is the core of a computer’s operating system, with complete control over everything in the system.
What is 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.
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 various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text.
Tasks
Explain in your own words and examples, what is Shell Scripting for DevOps?
Shell scripting is a computer program which can make use of commands and give the output to the console or whatever task we have assigned it completes and gives us the result.
What is #!/bin/bash?
can we write #!/bin/sh
as well?
#!/bin/bash is an shabang line which is very necessary for starting a shellscript without this line shell script cannot be run
#!/bin/sh = NO we cannot write these shell script will not run.
Write a Shell Script which prints I will complete #90DaysOofDevOps challenge ?
#!/bin/bash
echo "I will be completing DevOps 90 Days Challenge-----"
Write a Shell Script to take user input, input from arguments and print the variables?
#!/bin/bash
echo Hello, who am I talking to?
read varname
echo It's nice to meet you $varname
Write an Example of If else in Shell Scripting by comparing 2 numbers?
#!/bin/bash
echo "Enter you first number"
read num1
if [ $num1 == 0 ] ;
then echo "Please enter number greater than 0"
fi
if [ $num1 != 0 ] ;
then echo "Your number is $num1"
fi
exit