Name

col

Synopsis

col [options]

Description

A postprocessing filter that handles reverse linefeeds and escape characters, allowing output from tbl or nroff to appear in reasonable form on a terminal.

Options

-b

Ignore backspace characters; helpful when printing manpages.

-f

Process half-line vertical motions, but not reverse line motion. (Normally, half-line input motion is displayed on the next full line.)

-l n

Buffer at least n lines in memory. The default buffer size is 128 lines.

-x

Normally, col saves printing time by converting sequences of spaces to tabs. Use -x to suppress this conversion.

Examples

Run myfile through tbl and nroff, then capture output on screen by filtering through col and more:

                     tbl myfile | nroff | col | more

Save manpage output for the ls command in out.print, stripping out backspaces (which would otherwise appear as ^H):

                     man ls | col -b > out.print

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.