col [-bfpx] [-l num]

Filters out reverse (and half reverse) line feeds so the output is in the correct order with only forward and half forward line feeds, and
replaces white-space with tabs or with replaces tabs with spaces.
Intended to be used for printers which cannot reverse the platen, cannot backsace and do not support the TAB function.
Useful for processing output of nroff and tbl.

-b backspaces are not output, printing only the last character written to each column position.
-f Forward half line feeds are permitted (''fine'' mode).
Default: characters printed on a half line boundary are printed on the following line.
-p Pass unknown control sequences through unchanged.
Default: removes unrecognized control sequences
-x exand tabs to multiple spaces.
-l num line buffering, at least num lines in memory. Default: 128

The control sequences recognized:

carriage return newline forward line feed & carriage return (i.e. sets to first column)
ESC-9 half forward line feed
ESC-7 reverse line feed ESC-8 half reverse line feed
reverse line feed
vertical tab
space moves forward one column tab moves forward to next tab stop
backspace moves back one column
(ignored in the first column)
shift out to alternate character set
shift in to normal character set

Unrecognized control characters and escape sequences are discarded.

Col keeps track of the character set as characters are read and makes sure the character set is correct when they are output.

If the input attempts to back up to the last flushed line, col will display a warning message.

SEE ALSO expand, nroff, tbl, column