LPI
101-500 · Question #497
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
The correct answer is A. tr -d `\r' < userlist.txt > newlist.txt. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
GNU and Unix Commands
Question
Which of the following commands changes all CR-LF line breaks in the text file userlist.txt to Linux standard LF line breaks and stores the result in newlist.txt?
Options
- Atr -d `\r' < userlist.txt > newlist.txt
- Btr -c
\n\r'' <newlist.txt> userlist.txt - Ctr
\r\n'' <userlist.txt> newlist.txt - Dtr
\r'\n' userlist.txt newlist.txt - Etr -s `/^M/^J/' userlist.txt newlist.txt
How the community answered
(38 responses)- A74% (28)
- B3% (1)
- C3% (1)
- D13% (5)
- E8% (3)
Explanation
You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Topics
#tr command#line ending conversion#CR-LF to LF#text processing
Community Discussion
No community discussion yet for this question.