logoalt Hacker News

Joker_vDtoday at 2:39 AM1 replyview on HN

Yep, on Unixen the translation of CRLF to LF when printing to the terminal (and from CR to CRLF when reading input from the terminal) is done in the kernel, it's called "line discipline".


Replies

poizan42today at 3:19 AM

And if you switch the tty from "cooked" to "raw" mode then it doesn't do the conversion, and a CR just moves the cursor back to the start of the line and a LF just moves the cursor one line down.

show 1 reply