The col utility reads from the standard input and writes to the standard output. It performs the line overlays implied by reverse line-feeds, and by forward and reverse half-line-feeds.
Unless -x is used, all blank characters in the input will be converted to tab characters wherever possible. col is particularly useful for filtering multi-column output
made with the .rt command of nroff(1) and output resulting from use of
the tbl(1) preprocessor.
The ASCII control characters SO and SI are assumed by col to start and end text
in an alternative character set. The character set to which each input character belongs is remembered, and on output SI and SO characters
are generated as appropriate to ensure that each character is written in the correct character set.
On input, the only control characters accepted are space, backspace, tab, carriage-return and newline characters, SI, SO, VT, reverse line-feed, forward half-line-feed and reverse half-line-feed. The VT character is an alternative form of full reverse line-feed, included
for compatibility with some earlier programs of this type. The only other characters to be copied to the output are those that are printable.
The ASCII codes for the control functions and line-motion sequences mentioned above are as given in the table below. ESC stands for
the ASCII escape character, with the octal code 033; ESC- means a sequence of two characters, ESC followed by the character x.
reverse line-feed | ESC-7 |
reverse half-line-feed | ESC-8 |
forward half-line-feed | ESC-9 |
vertical-tab (VT) | 013 |
start-of-text (SO) | 016 |
end-of-text (SI) | 017 |
|