Day-4 of DevOps Challenge: Dive into Essential Linux Shell Scripting
What is Kernel?
Kernel 💻is the heart❤️ (Core) of the system , which communicates with system hardware 🖥️ and manages all the things.
What Is SH?
The shell 🐚 is a special program that talks to the kernel (the core of the operating system) and gives it instructions. It takes commands that humans can understand and translates them into instructions the kernel can understand.
What is Linux Shell Scripting?
A shell script 🐚 in Linux is a set of commands that perform multiple tasks automatically. With a Linux shell script, you can execute several tasks at once.
**I have performed some tasks that might help everyone understand basic Linux scripting****
Explain in your own words and with examples what Shell Scripting means for DevOps.
A shell script 🐚 is used to automate tasks by executing a set of commands. For example, if you want to back up some data at regular intervals, you can create a script to automate this task.
What is #!/bin/bash? Can we write #!/bin/sh as well?
#!/bin/bash
is called a shebang line. This command ensures that the script is executed by the Bash shell. There are multiple types of shells available on the market.
Initially, when a shell was launched, it was responsible for executing the script. However, there were some issues at that time. Later, Bash was introduced to the market and was named the Bourne Again Shell (Bash) 🐚. Bash is the latest shell that we use.
Write a Shell Script that prints I will complete #90DaysOfDevOps challenge.
In Linux, the echo
command is used to print text or variables to the terminal.
Write a Shell Script that takes user input, input from arguments, and prints the variables.
Provide an example of an If-Else statement in Shell Scripting by comparing two numbers.
example-2
Subscribe to my newsletter
Read articles from Akash Rastogi directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by