Bird
0
0

You want to replace all vowels in a string with '*'. Which command achieves this?

hard📝 Application Q8 of 15
Linux CLI - Text Processing
You want to replace all vowels in a string with '*'. Which command achieves this?
Aecho "hello" | tr 'aeiou' '*'
Becho "hello" | tr 'aeiou' 'AEIOU'
Cecho "hello" | tr -d 'aeiou'
Decho "hello" | tr 'aeiou' '12345'
Step-by-Step Solution
Solution:
  1. Step 1: Identify vowels to replace

    Vowels are 'a', 'e', 'i', 'o', 'u'.
  2. Step 2: Replace vowels with '*'

    Using tr 'aeiou' '*' replaces each vowel with '*'.
  3. Final Answer:

    echo "hello" | tr 'aeiou' '*' -> Option A
  4. Quick Check:

    Vowels replaced by '*' = echo "hello" | tr 'aeiou' '*' [OK]
Quick Trick: Map vowels to '*' using tr sets [OK]
Common Mistakes:
  • Replacing vowels with letters
  • Deleting vowels instead of replacing
  • Using wrong target length

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes