The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><head><title>col</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
</head>
<body class='pod'>
<!--
  generated by Pod::Simple::HTML v3.01,
  using Pod::Simple::PullParser v2.02,
  under Perl v5.008002 at Thu Aug  5 13:56:21 2004 GMT.

 If you want to change this HTML document, you probably shouldn't do that
   by changing it directly.  Instead, see about changing the calling options
   to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
   then reconverting this document from the Pod source.
   When in doubt, email the author of Pod::Simple::HTML for advice.
   See 'perldoc Pod::Simple::HTML' for more info.

-->

<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>

<p><b>col</b> -- filter reverse line feeds from input</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>

<p><b>col</b> [<b>-bfpx</b>] [<b>-l num</b>] [<b>-Eest</b>]</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>

<p><b>col</b> 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).</p>

<p><b>col</b> reads from the standard input and writes to the standard output.</p>

<h2><a class='u' href='#___top' title='click to go to top of document'
name="OPTIONS"
>OPTIONS</a></h2>

<p><b>col</b> accepts the following standard options:</p>

<dl>
<dt><a name="-b"
><b>-b</b></a></dt><p class="pad"></p>

<dd>Do not output any backspaces,
printing only the last character written to each column position.</dd><p class="pad"></p>

<dt><a name="-f"
><b>-f</b></a></dt><p class="pad"></p>

<dd>Forward half-line feeds are permitted (&#34;fine&#34; mode).
Without this option,
characters which would be printed on a half-line boundary are printed on the following line.</dd><p class="pad"></p>

<dt><a name="-p"
><b>-p</b></a></dt><p class="pad"></p>

<dd>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.</dd><p class="pad"></p>

<dt><a name="-x"
><b>-x</b></a></dt><p class="pad"></p>

<dd>Output multiple spaces instead of tabs.
Tab stops are eight characters apart.</dd><p class="pad"></p>

<dt><a name="-l_num"
><b>-l</b> <i>num</i></a></dt><p class="pad"></p>

<dd>Buffer at least <i>num</i> lines in memory.
By default 256 lines (or 512 half-lines) are buffered.</dd><p class="pad"></p>
</dl>

<p><b>col</b> also accepts the following options for compatibility with other implementations:</p>

<dl>
<dt><a name="-E"
><b>-E</b></a></dt><p class="pad"></p>

<dd>Accept only IRIX-style escape sequences; a reverse line feed is an escape followed by the ASCII character 7.
The <b>-E</b> option overrides the <b>-e</b> option.</dd><p class="pad"></p>

<dt><a name="-e"
><b>-e</b></a></dt><p class="pad"></p>

<dd>Accept only BSD-style escape sequences; a reverse line feed is an escape followed by the ASCII character whose decimal value is 7 (control-g).
The <b>-e</b> option is overriden by the <b>-E</b> option.</dd><p class="pad"></p>

<dd>If neither the <b>-E</b> nor the <b>-e</b> option is used,
<b>col</b> accepts both BSD and IRIX style escapes sequences.</dd><p class="pad"></p>

<dt><a name="-s"
><b>-s</b></a></dt><p class="pad"></p>

<dd>Shift in before each line feed when in the alternate character set (as in IRIX <b>col</b>).
Without this option,
<b>col</b> only shifts in before the final line endings (as in BSD <b>col</b>).</dd><p class="pad"></p>

<dt><a name="-t"
><b>-t</b></a></dt><p class="pad"></p>

<dd>Ignore trailing input that is not followed by a line feed (as in IRIX <b>col</b>).
Without this option,
a final line feed is not necessary (as in BSD <b>col</b>.)</dd><p class="pad"></p>
</dl>

<p>The control sequences and their decimal ASCII values that col understands are listed in the following table:</p>

<pre lang='und' xml:lang='und'>    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).</pre>

<p>(See the explanations of <b>-e</b> and <b>-E</b> for more about escapes and line feeds.)</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="BUGS"
>BUGS</a></h1>

<p>This implementation of <b>col</b> has no known bugs.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="CAVEATS"
>CAVEATS</a></h1>

<p>Reverse line feeds and half reverse line feeds which would move past the start of the buffer are ignored.</p>

<p>Unrecognized control characters are ignored.</p>

<p>Unrecognized escape sequences are ignored, unless the <b>-p</b> option is used.</p>

<p>Some versions of <b>col</b> for BSD may convert spaces to tabs incorrectly. This implementation of <b>col</b> does not emulate that bug.</p>

<p>This implementation of <b>col</b> was compared to the <b>col</b> utility on IRIX and BSD, and includes compatibility modes for both those systems. The <b>col</b> utilities on other systems may have further differences in behavior.</p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="REVISION_HISTORY"
>REVISION HISTORY</a></h1>

<pre lang='und' xml:lang='und'>    $Log: col.rjk.html,v $
<pre lang='und' xml:lang='und'>    Revision 1.2  2004/08/05 14:18:04  cwest
<pre lang='und' xml:lang='und'>    cleanup, new version number on website
<pre lang='und' xml:lang='und'>
    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</pre>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>

<p>This implementation of <b>col</b> in Perl was written by Ronald J Kimball, <i>rjk-perl@tamias.net</i></p>

<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_and_LICENSE"
>COPYRIGHT and LICENSE</a></h1>

<p>This program is copyright 2000 by Ronald J Kimball.</p>

<p>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.</p>

<!-- end doc -->

</body></html>