Bird
0
0

Why does using the read command in a bash script make it interactive?

easy🧠 Conceptual Q1 of 15
Bash Scripting - User Input
Why does using the read command in a bash script make it interactive?
ABecause it automatically runs commands without user input
BBecause it waits for user input during script execution
CBecause it prints output to the screen
DBecause it ends the script immediately
Step-by-Step Solution
Solution:
  1. Step 1: Understand what read does

    The read command pauses the script and waits for the user to type something.
  2. Step 2: Connect read to interactivity

    Since the script waits for user input, it becomes interactive, responding to what the user types.
  3. Final Answer:

    Because it waits for user input during script execution -> Option B
  4. Quick Check:

    Interactivity = Waiting for user input [OK]
Quick Trick: Read pauses script to get user input, making it interactive [OK]
Common Mistakes:
MISTAKES
  • Thinking read outputs text
  • Believing read ends the script
  • Confusing read with echo

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes