QuestionQ84

VerifiedGNU and Unix Commands

Which of the following commands converts every CR-LF line break in the text file userlist.txt to Linux-standard LF line breaks and saves the result in newlist.txt?

Explanation

A CR-LF line ending is \r\n; deleting the \r character leaves \n, which is the Linux LF line ending. GNU tr -d deletes the specified input characters, and shell redirection reads from the source file and writes the transformed output to the destination file.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!