Linux Administration
medium

Questão de Linux Administration #019e3987

Enunciado da Questão
Linux Administration
#tr
#squeeze
#spaces
#redirection
Médio

Which of the following commands will reduce all consecutive spaces down to a single space?

A

tr '\s' ' ' < a.txt > b.txt

B

tr -c ' ' < a.txt > b.txt

C

tr -d ' ' < a.txt > b.txt

D

tr -r ' ' '
' < a.txt > b.txt

E

tr -s ' ' < a.txt > b.txt

Correta

Explicação Oficial / Explicações da Comunidade

The -s (squeeze-repeats) option of the tr command replaces each input sequence of a repeated character that is listed in the set with a single occurrence of that character.