Week-2 | Day-8: Shell Scripting Basics (Variables & Loops)

🐚 What is Shell Scripting?


🧩 Variables

Variables store data that can be reused later in the script.

Syntax:

variable_name=value

⚠️ No spaces before or after = in Bash.

Example:

#!/bin/bash
name="Harideep"
echo "Hello, $name! Welcome to CloudInSteps."

Reading input from user:

echo "Enter your favorite tool:"
read tool
echo "You like $tool!"

Types of variables:

Example:

echo "Current user: $USER"
echo "Home directory: $HOME"