In the stty
documentation, the following is mentioned:
[-]icrnl translate carriage return to newline
[-]inlcr translate newline to carriage return
* [-]ocrnl translate carriage return to newline
* [-]onlcr translate newline to carriage return-newline
Notice how the "cr" in icrnl
and inlcr
and ocrnl
mean "carriage return" but it means "carriage return-newline" in onlcr
.
Is this a typo, or is this how onlcr
really works (i.e.
it translates \n
to \r\n
)?
stty -nl
(CRMOD
flag insgtty.h
) would have been the equivalent of today'sstty icrnl onlcr
– Stéphane Chazelas Oct 30 '17 at 13:21