COL ( 1 ) USER COMMANDSCOL ( 1 )


NAME

col - filter reverse line-feeds

SYNOPSIS

col [ options ]

DESCRIPTION

col reads from standard input and writes onto standard output. col 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 characters with tabs where possible. This can be useful in processing the output of nroff(1) and tbl(1).

The control sequences for carriage motion that col understands and their decimal values are listed in the following table:
ESC-7?reverse line feed (escape then 7).
ESC-8
half reverse line feed (escape then 8).
ESC-9
half forward line feed (escape then 9).
backspace
moves back one column (8); ignored in the first column.
carriage return
(13).
newline
forward line feed (10); also does carriage return.
shift in
shift to normal character set (15).
shift out
shift to alternate character set (14).
space
moves forward one column (32).
tab
moves forward to next tab stop (9).
vertical tab
reverse line feed (11).

All unrecognized control characters and escape sequences are discarded.

If the -b option is given, col assumes that the output device in use is not capable of backspacing. In this case, if two or more characters are to appear in the same place, only the last one read will be output.

Although col accepts half-line motions in its input, it normally does not emit them on output. Instead, text that would appear between lines is moved to the next lower full-line boundary. This treatment can be suppressed by the -f (fine) option; in this case, the output from col may contain forward half-line-feeds (ESC-9), but will still never contain either kind of reverse line motion.

OPTIONS

-b
Assume that the device cannot backpace.
-f
Allow half forward line feeds. This is the default.
-h
Compress spaces into tabs.
-l lines
lines is the maximum number of lines to keep in memory. The default value is 128 .
-x
Do not compress spaces into tabs.

EXIT STATUS

0
Successful completion.
>0
One or more errors occurred.

SEE ALSO

expand(1), nroff(1), tbl(1)

IMPLEMENTATION

version
col (AT&T Labs Research) 1999-06-20
author
Michael Rendell
copyright
Copyright © 1990-2010 The Regents of the University of California
license
http://www.opensource.org/licenses/bsd-license