exam questions

Exam 101-500 All Questions

View all questions & answers for the 101-500 exam

Exam 101-500 topic 1 question 43 discussion

Actual exam question from LPI's 101-500
Question #: 43
Topic #: 1
[All 101-500 Questions]

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?

  • A. tr -d '\r' < userlist.txt > newlist.txt
  • B. tr -c '\n\r' '' userlist.txt
  • C. tr '\r\n' '' newlist.txt
  • D. tr '\r' '\n' userlist.txt newlist.txt
  • E. tr -s '/^M/^J/' userlist.txt newlist.txt
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ninymo
3 months, 3 weeks ago
Answer: A
upvoted 1 times
...
Ralf_G
4 months, 2 weeks ago
The syntax salad that is given here as possible answers does not exist. The correct answer is: A) $ tr -d '\r' < userlist.txt > newlist.txt
upvoted 1 times
...
JopieJo
1 year, 6 months ago
Agree with opt A: Only delete (tr -d) the Carriage Return (CR) character (0x0D, \r) and leave the Line Feed (LF) character (0x0A, \n) in tact. tr -d '\r' <input file> <output file>
upvoted 2 times
...
AdamCzepiel
1 year, 8 months ago
checked, correct -> https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-lf
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago