225k views
1 vote
Somebody supplied me with a file that was edited on a Windows machine. The file contains carriage returns in addition to the newlines. I need to eliminate the carriage returns, so I use

a. tr
b. diff
c. Onl
d. cut

User JeniT
by
8.5k points

1 Answer

3 votes

Answer:

It is tr.

Step-by-step explanation:

For removing all the carriage returns you can make use tr like

tr '\r\\' ' '

However, you cannot make use of the diff which finds the difference between the two files.

Onl is definitely not an option and cut holds different meaning that we know, Hence the above answer, tr can definitely help as shown above,

User FryDay
by
7.8k points