DAY-1 of Bash Blaze Challenge: From Zero to Bash Hero!

DAY-1 of Bash Blaze Challenge: From Zero to Bash Hero!

#BashBlazeChallenge #batch-8 #TrainWithShubham #ShubhamLondhe

As someone who’s always eager to dive into new learning experiences, joining the #BashBlazeChallenge led by #ShubhamLondhe was a no-brainer! Batch-8 is ongoing with lots of sharpening skills and is testing the limits of creativity through scripting. Here’s a little insight into the challenge!

Challenge Title: First day of Scripting

Challenge Scenario:

Participants were tasked with creating a bash script that performs a variety of tasks, from simple echoes to using wildcards and built-in variables. This was a real-world problem scenario designed to help us develop scripts that solve day-to-day automation tasks.

Challenge Objectives:

  1. Write clean and well-documented bash scripts.

  2. Use variables and built-in variables efficiently.

  3. Perform arithmetic operations using input variables.

  4. Leverage wildcards to list specific files.

  5. Understand and apply commenting and echo commands.

Step-by-Step Instructions for the Challenge:

  1. Task 1: Use of Comments help explain what the code is doing. I added comments throughout the script to ensure that even a beginner can follow along.

  2. Task 2: Use of Echo

  3. Task 3: Variables Declaring and assigning variables in bash is straightforward. For this task, I took user inputs for two numbers.

  4. Task 4: Using Variables I created a script that prompts for two numbers, sums them, and prints the result using echo.

  5. Task 5: Using Built-in Variables I utilized three bash built-in variables: $BASH, $BASH_VERSION, $PWD

  6. Task 6: Wildcards: Listing files in a particular Directory.

Solution Details:

Here’s the bash script I came up with:

Conclusion:

This challenge not only improved my understanding of bash but also showed me the beauty of automation in scripting.

You can check out my solution on GitHub: shinagupta/BashBlaze-7-Days-of-Bash-Scripting-Challenge

To view or add a comment, sign in

Others also viewed

Explore topics