nerdexam
CompTIA

LX0-101 · Question #266

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

(41 responses)
  • A
    5% (2)
  • B
    2% (1)
  • C
    80% (33)
  • D
    10% (4)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice