CR, LF, and CRLF Line Endings Explained
CR (\r), LF (\n), and CRLF (\r\n) are three ways to mark the end of a line. Windows uses CRLF, Unix, Linux, and modern macOS use LF, and old Mac OS used CR alone. Mixed endings break scripts, Git diffs, and pasted text. A CR line ending is one of three hidden markers that tell…


