Bird
0
0

What will the following Bash command output?

medium📝 Command Output Q13 of 15
Linux CLI - Linux Basics and Terminal
What will the following Bash command output?
echo "Hello"; echo "World"
AHello World (two lines)
BHello\nWorld
CHello World
DHello World
Step-by-Step Solution
Solution:
  1. Step 1: Understand the echo command

    Each echo prints its argument followed by a new line by default.
  2. Step 2: Analyze the command sequence

    First echo prints 'Hello' then newline, second echo prints 'World' then newline, so output is two lines.
  3. Final Answer:

    Hello World (two lines) -> Option A
  4. Quick Check:

    echo prints with newline [OK]
Quick Trick: echo prints text then newline by default [OK]
Common Mistakes:
MISTAKES
  • Thinking echo joins output on one line
  • Confusing literal \n with newline
  • Ignoring semicolon separates commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes