Bird
0
0

What will this shell script output?

medium📝 Command Output Q13 of 15
Bash Scripting - Basics
What will this shell script output?
#!/bin/bash
echo "Hello, World!"
AError: command not found
Becho "Hello, World!"
CNo output
DHello, World!
Step-by-Step Solution
Solution:
  1. Step 1: Understand the echo command

    The echo command prints the text inside quotes to the screen.
  2. Step 2: Predict the output

    The script will print exactly: Hello, World!
  3. Final Answer:

    Hello, World! -> Option D
  4. Quick Check:

    echo prints text = Hello, World! [OK]
Quick Trick: echo prints text exactly as given [OK]
Common Mistakes:
MISTAKES
  • Thinking echo prints the command itself
  • Expecting error without cause
  • Assuming no output without running script

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes