Somehow they had no idea, git certainly did though.
Every developer knew this though, as no editor handled this out of the box. (Vim has a simple setting to enable this, but for some reason it is not on by default)
I've encountered some very old files using LFCR instead of the more modern CRLF.
LF CR did surface briefly in the early days of PC’s, I can’t remember where, but before the days of “glass teletypes” you learned very quickly not to do that. Adding a couple of NULs to let the print head settle down was sometimes necessary if you really wanted clean print.
And I mean, why are any code editors on Windows saving with ^M endings?!
Because otherwise, when you open the file on Notepad, it shows up as a single long line (other text editors tend to be smarter and understand both kinds of line endings).
https://devblogs.microsoft.com/commandline/extended-eol-in-n...
https://devblogs.microsoft.com/commandline/extended-eol-in-n...
Yep. Never owned a typewriter and I never understood why CR/LF was a "newline" until I saw a youtube video showing the "CR" and "LF" of a typewriter. Then it all made sense.
Also, the fact that unix uses LF and windows uses CR/LF added to the confusion as well.
And old Macs used CR. And some very rare old OSes used LF/CR!
And then there's the practice on Unix of treating page feed as a scroll pause in pagers — I don't believe that I've seen that elsewhere.
So much for a standard code for information interchange! Don't even get me started about the file, group, record & unit (i.e., field) separators …
I have no idea if overtyping (ie a CR without a LF) was ever used but surely the terminal line replacement use of CR didn’t exist when Unix was created
I feel like every now again I still open some file with ^M characters in it.