On Unix-like operating systems, the col command filters reverse linefeeds from input.

This page covers the GNU/Linux version of col.

Description

The col utility filters out reverse (and half reverse) line feeds so that the output is in the correct order with only forward and half forward line feeds, and replaces whitespace characters with tabs where possible. This is useful in processing the output of nroff and tbl.

  • Description
  • Syntax
  • Options
  • Recognized control sequences
  • Related commands
  • Linux commands help

The col utility reads from the standard input and writes to the standard output.

Syntax

col [-bfhpx] [-l num]

Options

Recognized control sequences

The control sequences for carriage motion that col understands and their decimal values are listed in the following table:

All unrecognized control characters and escape sequences are discarded.

The col utility 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 displays a warning message.

nroff — Format documents for terminal display or line-printer.tbl — Preprocessor which formats tables for nroff or troff.troff — Typeset or format documents for terminal display or line-printer.