col -- filter reverse line feeds from input
col [-bfpx] [-l num] [-Eest]
col 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 can be useful in processing the output of
nroff(1) and tbl(1).
col reads from the standard input and writes to the standard output.
col accepts the following standard options:
col also accepts the following options for compatibility with other implementations:
If neither the -E nor the -e option is used, col accepts both BSD and IRIX style escapes sequences.
The control sequences and their decimal ASCII values that col understands are listed in the following table:
ESC-7 Reverse line feed (escape then 7). ESC-8 Half reverse line feed (escape then 8). ESC-9 Half forward line feed (escape then 9). backspace Moves back one column (8); ignored in the first column. carriage return (13) newline Forward line feed (10); also does carriage return. shift in Shift to normal character set (15). shift out Shift to alternate character set (14). space Moves forward one column (32). tab Moves forward to next tab stop (9). vertical tab Reverse line feed (11).
(See the explanations of -e and -E for more about escapes and line feeds.)
This implementation of col has no known bugs.
Reverse line feeds and half reverse line feeds which would move past the start of the buffer are ignored.
Unrecognized control characters are ignored.
Unrecognized escape sequences are ignored, unless the -p option is used.
Some versions of col for BSD may convert spaces to tabs incorrectly. This implementation of col does not emulate that bug.
This implementation of col was compared to the col utility on IRIX and BSD, and includes compatibility modes for both those systems. The col utilities on other systems may have further differences in behavior.
$Log: col.ppt,v $ Revision 1.3 2003/06/06 03:44:01 rjk updates to POD new email address
Revision 1.2 2001/04/11 03:54:36 rjk avoid POD warnings for bare -E, etc.
Revision 1.1 2000/02/12 15:46:03 rjk Initial revision
This implementation of col in Perl was written by Ronald J Kimball, firstname.lastname@example.org
This program is copyright 2000 by Ronald J Kimball.
This program is free and open software. You may use, modify, or distribute this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.