tr -d '\r' < win.txt

Category: Administration

tr -d '\r' < win.txt

Strip carriage returns from a file

The -d flag deletes characters, so this removes every carriage return from a Windows CRLF file, leaving clean Unix line endings. Feed the result to a new file with a redirect instead of printing it. The same trick fixes files that show ^M in editors.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.