nerdexam
LPI

101-400 · Question #31

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

The correct answer is E. tr -s ' ' < a.txt > b.txt. See the full explanation below for the reasoning.

Question

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

Options

  • Atr '\s' ' ' < a.txt > b.txt
  • Btr -c ' ' < a.txt > b.txt
  • Ctr -d ' ' < a.txt > b.txt
  • Dtr -r ' ' '\n' < a.txt > b.txt
  • Etr -s ' ' < a.txt > b.txt

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    14% (5)
  • C
    3% (1)
  • D
    8% (3)
  • E
    72% (26)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice