LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.





Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



col

col [options]

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