Name
col
Synopsis
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 | moreSave manpage output for the ls command in out.print, stripping out backspaces (which would otherwise appear as ^H):
man ls | col -b > out.printBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access