Re:Regex character "$" doesn't mean "end-of-string"
by jbverschoor on Wednesday March 20, 2024 @01:07PM
(#39769350)
It’s similar to an old school typewriter.
The handle does 2 things: return and feed. You can also just return by not pulling all the way or the other way around depending on the design
Re:Regex character "$" doesn't mean "end-of-string"
by HideousKojima on Wednesday March 20, 2024 @02:30PM
(#39770315)
Which also let you do strikethrough and similar effects by typing over a line you already typed
Re:Regex character "$" doesn't mean "end-of-string"
by keybored on Wednesday March 20, 2024 @03:03PM
(#39770664)
It is known. Why didn’t Linux decide to do that though.
Re:Regex character "$" doesn't mean "end-of-string"
by keybored on Wednesday March 27, 2024 @06:44PM
(#39845504)
Oh well. It’s more important to well-actually your knowledge of typewriter characters than to explain the history of why Windows is apparently the only platform (not Linux, not Mac, probably not the BSDs) that had to take “backwards compatibility” into concern.
\r - returned teletype head to the start of a line
\n - move paper one line down
> The sequence CR+LF was commonly used on many early computer systems that had adopted Teletype machines—typically a Teletype Model 33 ASR—as a console device, because this sequence was required to position those printers at the start of a new line. The separation of newline into two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in time to print the next character. Any character printed after a CR would often print as a smudge in the middle of the page while the print head was still moving the carriage back to the first position. "The solution was to make the newline two characters: CR to move the carriage to column one, and LF to move the paper up."[2] In fact, it was often necessary to send extra padding characters—extraneous CRs or NULs—which are ignored but give the print head time to move to the left margin. Many early video displays also required multiple character times to scroll the display.
https://en.wikipedia.org/wiki/Newline