#90daysofdevops { Day -4}

Nikhil KathaleNikhil Kathale
3 min read

Get ready for a thrilling ride on day four of my blogging journey as we unravel the power of Basic Linux Shell Scripting. 🌟 From automation to efficiency, each command holds the key to DevOps mastery! πŸ’»βœ¨ Thank you so much for all the shares and impression , it really boosted my LinkedIn account reach πŸŒŸπŸ‘©β€πŸ’»πŸš€

WHAT THE HECK IS KERNEL ?

The Heartbeat of Your System! πŸ’–πŸš€

Imagine your computer as a bustling city, and at its vibrant core is the Kernel – the ultimate maestro orchestrating everything! 🎢 This superhero of software is the bridge between your hardware and software, managing tasks like a cosmic conductor guiding a symphony. πŸŒŒπŸ”§ It handles requests, allocates resources, and ensures that your favorite apps run seamlessly – a digital guardian ensuring your computing journey is nothing short of spectacular! 🌟 So, next time you click, type, or game away, remember to salute the Kernel, the unsung hero behind the scenes!

_______________________________________________________________________________________

WHAT THE HECK IS SHELL ?

🐚 Shell: Your Tech Magic Wand! βœ¨πŸ’»

he shell is not just a mundane interface; it's your gateway to a digital wonderland! πŸšͺ✨ Think of it as a powerful magic wand that lets you command your computer with a flick! πŸͺ„πŸ’« The shell is your personal genie, ready to grant wishes in the form of executing commands, navigating files, and making your tech dreams come true!

_________________________________________________________________________________________

WHAT THE HECK IS LINUX SHELL SCRIPTING ?

πŸ§πŸš€ Linux Shell Scripting: Power in Simplicity!

Linux Shell Scripting is like your tech choreographer, choreographing a dance of commands! πŸŽ­πŸ’» In simple terms, it's writing scripts to automate tasks, making your computer do tricks at your command. πŸ€–πŸ”§ Whether you're a coding maestro or a newbie, shell scripting is your backstage pass to streamlining tasks and unleashing efficiency! πŸŒπŸš€

_________________________________________________________________________________________

Understanding #!/bin/bash vs. #!/bin/sh:

The shebang (#!/bin/bash or #!/bin/sh) is a directive at the beginning of a shell script that specifies the shell interpreter to be used. #!/bin/bash indicates the Bash shell, while #!/bin/sh typically points to the system's default shell. In many systems, /bin/sh is a symbolic link to /bin/bash, so they might behave similarly. However, if a script requires specific Bash features, it's recommended to use #!/bin/bash.

Now, let's create the requested shell scripts:

1. Shell Script to Print a Message:

#!/bin/bash

echo "I will complete #90DaysOfDevOps challenge"

2. Shell Script to Take User Input:

#!/bin/bash

echo "Enter your name:"
read username
echo "Hello, $username! Welcome to the script."

3. Shell Script to Use Command Line Arguments:

#!/bin/bash

echo "The script name is: $0"
echo "First argument: $1"
echo "Second argument: $2"

4. Example of If Else in Shell Scripting:

#!/bin/bash

num1=5
num2=10

if [ $num1 -eq $num2 ]; then
  echo "Numbers are equal"
elif [ $num1 -lt $num2 ]; then
  echo "$num1 is less than $num2"
else
  echo "$num1 is greater than $num2"
fi

Connect with me on LinkedInπŸ‘”πŸŒ:https://www.linkedin.com/in/nikhil-kathale-27544a1b5/

12
Subscribe to my newsletter

Read articles from Nikhil Kathale directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nikhil Kathale
Nikhil Kathale