Bird
0
0

Which of the following is the correct syntax to convert lowercase letters to uppercase using tr?

easy📝 Syntax Q3 of 15
Linux CLI - Text Processing
Which of the following is the correct syntax to convert lowercase letters to uppercase using tr?
Atr '0-9' 'A-Z'
Btr 'A-Z' 'a-z'
Ctr 'a-z' 'A-Z'
Dtr 'a-z' 'a-z'
Step-by-Step Solution
Solution:
  1. Step 1: Identify source and target sets

    To convert lowercase to uppercase, source is 'a-z' and target is 'A-Z'.
  2. Step 2: Confirm syntax correctness

    The syntax tr 'a-z' 'A-Z' correctly maps each lowercase letter to uppercase.
  3. Final Answer:

    tr 'a-z' 'A-Z' -> Option C
  4. Quick Check:

    Lowercase to uppercase = tr 'a-z' 'A-Z' [OK]
Quick Trick: Source is lowercase, target is uppercase [OK]
Common Mistakes:
  • Swapping source and target
  • Using digits instead of letters
  • Using identical sets

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes