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?

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?

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?

A.
tr ‘\r\n’ ” < userlist.txt > newlist.txt

B.
tr -c ‘\n\r’ ” < newlist.txt > userlist.txt

C.
tr -d ‘\r’ < userlist.txt > newlist.txt

D.
tr ‘\r’ ‘\n’ userlist.txt newlist.txt

E.
tr -s ‘^M’ ‘^J’ userlist.txt newlist.txt



Leave a Reply 2

Your email address will not be published. Required fields are marked *


c3619045@trbvm.com

[email protected]

tr -d ‘\r’ newlist.txt doesn’t work.

tr ‘\r’ ‘\n’ newlist.txt would be correct, perhaps a typo?

Busindre

Busindre

The answer is correct

C –> tr -d “\r” newlist.txt