nerdexam
LPI

101-350 · Question #38

Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt?

The correct answer is C. tr -d '\r' < userlist.txt > newlist.txt. See the full explanation below for the reasoning.

Question

Which of the following commands will change all CR-LF pairs in an imported text file, userlist.txt, to Linux standard LF characters and store it as newlist.txt?

Options

  • Atr '\r\n' '' < userlist.txt > newlist.txt
  • Btr -c '\n\r' '' < newlist.txt > userlist.txt
  • Ctr -d '\r' < userlist.txt > newlist.txt
  • Dtr '\r' '\n' userlist.txt newlist.txt
  • Etr -s '^M' '^J' userlist.txt newlist.txt

How the community answered

(29 responses)
  • B
    7% (2)
  • C
    83% (24)
  • D
    3% (1)
  • E
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 101-350 Practice