COL(1)
π col(1): the reverse-line-feed filter, bestie edition π
β¨ NAME β¨
okay so this is col β filter reverse line feeds from input. thatβs the whole vibe. π
π¦ SYNOPSIS π¦
col [-bfhpstx] [-l num]
πΈ DESCRIPTION πΈ
okay so bestie, 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 it 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. no cap.
π οΈ OPTIONS π οΈ
col accepts the following standard options:
-bβ Do not output any backspaces, printing only the last character written to each column position.-fβ Forward half-line feeds are permitted ("fine" mode). Without this option, characters which would be printed on a half-line boundary are printed on the following line.-hβ Compress spaces into tabs. This option is the default behavior.-pβ Output unrecognized escape sequences. Without this option, unrecognized escape sequences are ignored. Because escape sequences may be overprinted from reverse line feeds, the use of this option is highly discouraged unless the user is fully aware of the textual position of the escape sequences. π¨-xβ Output multiple spaces instead of tabs. Tab stops are eight characters apart. This option takes precedence over the-hoption.-l numβ This option is ignored for compatibility reasons.
col also accepts the following options for compatibility with other implementations:
-sβ Shift in before each line feed when in the alternate character set (as in IRIXcol). Without this option,colonly shifts in before the final line endings (as in BSDcol).-tβ Ignore trailing input that is not followed by a line feed (as in IRIXcol). Without this option, a final line feed is not necessary (as in BSDcol.)
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).
π BUGS π
This implementation of col has no known bugs. periodt. π
π CAVEATS π
- 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
-poption is used. - Some versions of
colfor BSD may convert spaces to tabs incorrectly. This implementation ofcoldoes not emulate that bug. Thecolutilities on other systems may have further differences in behavior.
π AUTHOR π
This implementation of col in Perl was written by Ronald J Kimball, rjk-perl@tamias.net π«Ά
π COPYRIGHT and LICENSE π
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.
π cute sign-off: this page ships withperl v5.42.2and is dated2026-02-15β bye bestie, go filter those reverse line feeds! π«Ά
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms