LPI
101-500 · Question #134
101-500 Question #134: Real Exam Question with Answer & Explanation
The correct answer is C. 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 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
Explanation
You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Topics
#tr command#line ending conversion#text processing#stream redirection
Community Discussion
No community discussion yet for this question.