nerdexam
LPI

101-500 · 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. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

GNU and Unix Commands

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

(17 responses)
  • A
    18% (3)
  • B
    6% (1)
  • D
    6% (1)
  • E
    71% (12)

Explanation

You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Topics

#tr command#text processing#squeeze flag#command options

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice