Bird
0
0

Why does this command fail?

medium📝 Debug Q7 of 15
Linux CLI - Text Processing
Why does this command fail?
echo "test" | tr 'a-z'
AInput string is empty
BSource set is invalid
CCommand needs -d option
DMissing second argument for target characters
Step-by-Step Solution
Solution:
  1. Step 1: Check command syntax

    tr requires two arguments: source and target sets.
  2. Step 2: Identify missing argument

    Only one set 'a-z' is provided, so the target set is missing, causing failure.
  3. Final Answer:

    Missing second argument for target characters -> Option D
  4. Quick Check:

    Two sets required = Missing second argument for target characters [OK]
Quick Trick: Always provide source and target sets for tr [OK]
Common Mistakes:
  • Providing only one set
  • Using wrong quotes
  • Expecting default target set

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes