Bird
0
0

What will be the output of:

medium📝 Command Output Q5 of 15
Linux CLI - Text Processing
What will be the output of:
echo "Hello 123" | tr -d '0-9'?
A123
BHello
CHello123
DHello 123
Step-by-Step Solution
Solution:
  1. Step 1: Understand the -d option

    The -d option deletes characters from the input that match the set.
  2. Step 2: Delete digits from input

    Digits '0-9' are removed from 'Hello 123', leaving 'Hello ' with the space.
  3. Final Answer:

    Hello -> Option B
  4. Quick Check:

    Delete digits = Hello [OK]
Quick Trick: Use -d to delete characters, not replace [OK]
Common Mistakes:
  • Expecting digits to be replaced
  • Removing spaces accidentally
  • Confusing -d with translation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes