col

remove reverse line-feeds 

Command


SYNOPSIS

col [-bfx] [file ...]


DESCRIPTION

The col command processes control characters for vertical line-feeds, handling them in a reasonable manner. col writes the processed text to the standard output. It is intended to be used as a filter between a program such as nroff and an output device which cannot handle reverse line-feeds.

col also performs some other formatting. Where possible, blank characters (spaces) are converted to tabs; tab stops are assumed to be every eight characters.

col also removes all escape sequences except for those shown in Table 1, Control Characters Allowed by col. ESC is the ASCII escape character, octal code 033.

Character ASCII Control Character (Octal)

Backspace 010
Carriage-return 015
Newline 012
Vertical Tab 013
SO 016
SI 017
space 040
tab 011
reverse line-feed ESC-7
reverse half-line-feed ESC-8
forward half-line-feed ESC-9

Table 1: Control Characters Allowed by col

The ASCII control characters SO and SI denote the beginning and end of text in an alternative character set. The set of each input character is remembered. col generates SO and SI characters as needed to output each character in the correct character set.

Options

-b 

ignores backspace ( CTRL-H) characters. If two characters are supposed to appear in the same space, the first character is ignored and the second is output.

-f 

allows forward half-line motions. Normally these are changed to forward full-line motions.

-x 

prevents conversion of spaces to tab characters.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to any of the following:

— invalid command line option
— insufficient memory


PORTABILITY

All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


NOTES

col ignores vertical motions that back up over the first line, so you may get unexpected results if the first line contains superscripts.

Because -f allows escape sequences through, it may cause unexpected results on terminals.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.4 Documentation Build 39.