Why input makes scripts interactive
📖 Scenario: Imagine you want to create a simple script that asks a user for their name and then greets them. This shows how scripts can interact with people by asking questions and using their answers.
🎯 Goal: Build a bash script that asks for the user's name, stores it, and then prints a greeting using that name.
📋 What You'll Learn
Use the
read command to get user inputStore the input in a variable called
namePrint a greeting message using the
echo command and the name variable💡 Why This Matters
🌍 Real World
Many scripts ask users for information like names, passwords, or choices to work correctly.
💼 Career
Understanding how to get user input is key for writing interactive scripts used in automation, system setup, and user tools.
Progress0 / 4 steps