101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 46


What is the output of the following command?

echo "Hello World" | tr -d aieou

Show Answer
Correct Answer: C

The `tr -d` command is used to delete specified characters from the input. In the command `echo "Hello World" | tr -d aieou`, the characters 'a', 'i', 'e', 'o', and 'u' are removed from the string "Hello World". Removing these characters results in the output "Hll Wrld".

Discussion

2 comments
Sign in to comment
ciola89Option: C
Sep 11, 2023

The tr command is a UNIX command-line utility for translating or deleting characters. It supports a range of transformations including uppercase to lowercase, squeezing repeating characters, deleting specific characters, and basic find and replace. It can be used with UNIX pipes to support more complex translation. How to delete specified characters using -d option. To delete specific characters use the -d option. This option deletes characters in the first set specified. $ echo "Welcome To GeeksforGeeks" | tr -d W Output: elcome To GeeksforGeeks

DuboisNicolasDuclairOption: C
Oct 21, 2023

The output of the following command: ```shell echo "Hello World" | tr -d aieou ``` is: C. Hll Wrld The `tr` command is used to delete characters specified in its argument. In this case, it deletes the characters "a," "i," "e," "o," and "u" from the input string "Hello World," resulting in "Hll Wrld."