Did Mac OS Lion switch to using line feeds (LF '\n') for line breaks instead of carriage returns (CR '\r')?

Solution 1:

I remember that Macs always used to use CR despite Unix using LF and Windows using CR+LF

Your memory is from the good old times though: Mac OS X, as POSIX-compliant Unix uses the typical Unix LF.

CR is a relict from the "classic" Mac OS, it's not used anymore.

For example, check the manpage of unix2dos (emphasis mine):

In DOS/Windows text files a line break, also known as newline, is a combination of two characters: a Carriage Return (CR) followed by a Line Feed (LF). In Unix text files a line break is a single character: the Line Feed (LF). In Mac text files, prior to Mac OS X, a line break was single Carriage Return (CR) character. Nowadays Mac OS uses Unix style (LF) line breaks.

An even more authoritative reference: Shell Scripting Primer: Designing Scripts for Cross-Platform Deployment

Command-line tools in Mac OS X (and other UNIX or Linux variants) use UNIX-style line endings. This means that each line in a text file ends with a newline character (character 10/0xA, often abbreviated LF).

Many older Mac applications use "Mac-style” line endings. This means that each line in a text file ends with a carriage return character (character 13/0xD, often abbreviated CR).