Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ col(1) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nroff(1)

tbl(1)

COL(1)  —  HP-UX

NAME

col − filter reverse line-feeds and backspaces

SYNOPSIS

col [ −blfxp ]

DESCRIPTION

Col reads from the standard input and writes onto the standard output.  It performs the line overlays implied by reverse line feeds (ASCII code ­ESC-7), and by forward and reverse half-line feeds (ESC-9 and ESCs+1-8).  Col is particularly useful for filtering multicolumn output made with the .rt command of nroff(1) and output resulting from use of the tbl(1) preprocessor.

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. 

If the −l option is given, col assumes the output device is a line printer (rather than a character printer) and removes backspaces in favor of multiply overstruck full lines.  It generates the minimum number of print operations necessary to generate the required number of overstrikes.  (All but the last print operation on a line are separated by carriage returns (\r); the last print operation is terminated by a newline (\n).) 

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.

Unless the −x option is given, col will convert white space to tabs on output wherever possible to shorten printing time. 

The ASCII control characters SO (\016) and SIs+1 (\017) are assumed by col to start and end text in an alternate character set.  The character set to which each input character belongs is remembered, and on output SI and SO characters are generated as
 appropriate to ensure that each character is printed in the correct character set.

On input, the only control characters accepted are space, backspace, tab, return, new-line, SI, SO, VT (\ 013), and ESC followed by 7, 8, or 9.  The VT character is an alternate form of full reverse line-feed, included for compatibility with some earlier programs of this type.  All other non-printing characters are ignored. 

Normally, col will ignore any unrecognized escape sequences found in its input; the −p option may be used to cause col to output these sequences as regular characters, subject to overprinting from reverse line motions.  The use of this option is highly discouraged unless the user is fully aware of the textual position of the escape sequences. 

SEE ALSO

nroff(1), tbl(1). 

NOTES

The input format accepted by col matches the output produced by nroff with either the −T37 or −Tlp options.  Use −T37 (and the −f option of col) if the ultimate disposition of the output of col will be a device that can interpret half-line motions, and −Tlp otherwise. 

BUGS

Cannot back up more than 128 lines. 
There is a maximum limit for the number of characters, including backspaces and overstrikes, on a line.  The maximum limit is at least 800 characters.
Local vertical motions that would result in backing up over the first line of the document are ignored. As a result, the first line must not have any superscripts.

INTERNATIONAL SUPPORT

8- and 16-bit data, 8-bit filenames, messages. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026