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)- A5% (2)
- B2% (1)
- C80% (33)
- D10% (4)
- E2% (1)
Community Discussion
No community discussion yet for this question.