Name

fixcrio — inserts missing CRs at the ends of lines.

Synopsis

fixcrio {prog}

Description

fixcrio runs prog filtering its standard I/O. It inserts CR at the end of each line of input that it passes to prog's input, and at the end of each line of output that it takes from prog's output; wherever those lines do not already have a CR.

The fixcrio process runs as a child of the prog process, so that service managers monitor and control the prog as the main program. It exits when it sees the end of prog's output.

Usage

One use of fixcrio is to wrap Unix programs that use plain LF newline sequences, so that they can be used as servers for Internet protocols that use CR+LF newline sequences.

See also

addcr(1)

a standalone filter that adds CRs in a unidirectional I/O stream

History

fixcrio was originally part of Daniel J. Bernstein's ucspi-tcp toolset in 1999.

Author

Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.