Hacker News new | past | comments | ask | show | jobs | submit login

CR is a common line ending for RS-232 devices. I've got 3 or 4 in a cabinet for my current job which are "line-based" and which use CR as the line-ending. To issue a command to one of these devices, you terminate the command with CR and then the device processes it. These same devices will also send response data with CR line endings.

This is partly why stty and termios have options for CRLF translation on terminals. I'm sure there's some historical reason for that.




I thought it was to do with the fact that you might want to use them separately sometimes? For instance you might want to repeat a line without a newline for a "bold" effect, or with underscores for underlining.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: