Removing the Windows end-of-line character "^M"

Removing the Windows end-of-line character ^M? Learn a simple and effective way to get rid of annoying ^M markers from C/C++ or HTML code using `tr`.

tr -d "\015" < file(in) > file(out)

This is an extremely helpful way to get rid of pesky ^M markers in freshly downloaded C/C++, html, or other source code. The tr command replaces or deletes characters. It's used in a command pipeline. Additional options: -d delete characters, -s remove repeating characters.