Bird
0
0

What is the output of this command?

medium📝 Command Output Q4 of 15
Bash Scripting - Text Processing in Scripts
What is the output of this command?
echo "abc123" | tr 'a-z' 'A-Z'
Aabc123
BABC123
C123ABC
DABCabc
Step-by-Step Solution
Solution:
  1. Step 1: Understand the command

    The command converts all lowercase letters to uppercase using tr 'a-z' 'A-Z'.
  2. Step 2: Apply transformation to input

    Input "abc123" becomes "ABC123" because digits remain unchanged.
  3. Final Answer:

    ABC123 -> Option B
  4. Quick Check:

    Lowercase to uppercase conversion = ABC123 [OK]
Quick Trick: Digits stay same; only letters change case [OK]
Common Mistakes:
MISTAKES
  • Expecting digits to change
  • No change in output
  • Mixing letter case incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Bash Scripting Quizzes