[BACK]Return to col.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / col

Annotation of src/usr.bin/col/col.1, Revision 1.5

1.5     ! aaron       1: .\"    $OpenBSD: col.1,v 1.4 1999/06/05 01:21:21 aaron Exp $
1.1       deraadt     2: .\"    $NetBSD: col.1,v 1.4 1995/03/26 05:25:52 glass Exp $
                      3: .\"
                      4: .\" Copyright (c) 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" This code is derived from software contributed to Berkeley by
                      8: .\" Michael Rendell.
                      9: .\"
                     10: .\" Redistribution and use in source and binary forms, with or without
                     11: .\" modification, are permitted provided that the following conditions
                     12: .\" are met:
                     13: .\" 1. Redistributions of source code must retain the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer.
                     15: .\" 2. Redistributions in binary form must reproduce the above copyright
                     16: .\"    notice, this list of conditions and the following disclaimer in the
                     17: .\"    documentation and/or other materials provided with the distribution.
                     18: .\" 3. All advertising materials mentioning features or use of this software
                     19: .\"    must display the following acknowledgement:
                     20: .\"    This product includes software developed by the University of
                     21: .\"    California, Berkeley and its contributors.
                     22: .\" 4. Neither the name of the University nor the names of its contributors
                     23: .\"    may be used to endorse or promote products derived from this software
                     24: .\"    without specific prior written permission.
                     25: .\"
                     26: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     27: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     28: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     29: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     30: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     31: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     32: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     33: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     34: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     35: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     36: .\" SUCH DAMAGE.
                     37: .\"
                     38: .\"     @(#)col.1      8.1 (Berkeley) 6/29/93
                     39: .\"
                     40: .Dd June 29, 1993
                     41: .Dt COL 1
                     42: .Os
                     43: .Sh NAME
                     44: .Nm col
                     45: .Nd filter reverse line feeds from input
                     46: .Sh SYNOPSIS
                     47: .Nm col
                     48: .Op Fl bfx
                     49: .Op Fl l Ar num
                     50: .Sh DESCRIPTION
1.4       aaron      51: .Nm
                     52: filters out reverse (and half-reverse) line feeds so that the output is
                     53: in the correct order with only forward and half-forward line
                     54: feeds, and replaces whitespace characters with tabs where possible.
1.1       deraadt    55: This can be useful in processing the output of
                     56: .Xr nroff 1
                     57: and
1.5     ! aaron      58: .Xr tbl 1 .
1.1       deraadt    59: .Pp
1.4       aaron      60: .Nm
1.1       deraadt    61: reads from the standard input and writes to the standard output.
                     62: .Pp
                     63: The options are as follows:
1.4       aaron      64: .Bl -tag -width "-l num"
1.1       deraadt    65: .It Fl b
                     66: Do not output any backspaces, printing only the last character
                     67: written to each column position.
                     68: .It Fl f
1.4       aaron      69: Forward half-line feeds are permitted
                     70: .Pf ( Ns Dq fine
                     71: mode).
                     72: Normally characters printed on a half-line boundary are printed
1.1       deraadt    73: on the following line.
                     74: .It Fl x
                     75: Output multiple spaces instead of tabs.
                     76: .It Fl l Ar num
                     77: Buffer at least
                     78: .Ar num
                     79: lines in memory.
                     80: By default, 128 lines are buffered.
                     81: .El
                     82: .Pp
                     83: The control sequences for carriage motion that
1.4       aaron      84: .Nm
1.1       deraadt    85: understands and their decimal values are listed in the following
                     86: table:
                     87: .Pp
                     88: .Bl -tag -width "carriage return" -compact
                     89: .It ESC\-7
1.4       aaron      90: Reverse line feed (escape then 7).
1.1       deraadt    91: .It ESC\-8
1.4       aaron      92: Half reverse line feed (escape then 8).
1.1       deraadt    93: .It ESC\-9
1.4       aaron      94: Half forward line feed (escape then 9).
1.1       deraadt    95: .It backspace
1.4       aaron      96: Moves back one column (8); ignored in the first column.
1.1       deraadt    97: .It carriage return
                     98: (13)
                     99: .It newline
1.4       aaron     100: Forward line feed (10); also does carriage return.
1.1       deraadt   101: .It shift in
1.4       aaron     102: Shift to normal character set (15).
1.1       deraadt   103: .It shift out
1.4       aaron     104: Shift to alternate character set (14).
1.1       deraadt   105: .It space
1.4       aaron     106: Moves forward one column (32).
1.1       deraadt   107: .It tab
1.4       aaron     108: Moves forward to next tab stop (9).
1.1       deraadt   109: .It vertical tab
1.4       aaron     110: Reverse line feed (11).
1.1       deraadt   111: .El
                    112: .Pp
                    113: All unrecognized control characters and escape sequences are
                    114: discarded.
                    115: .Pp
1.4       aaron     116: .Nm
1.1       deraadt   117: keeps track of the character set as characters are read and makes
                    118: sure the character set is correct when they are output.
                    119: .Pp
                    120: If the input attempts to back up to the last flushed line,
1.4       aaron     121: .Nm
1.1       deraadt   122: will display a warning message.
                    123: .Sh SEE ALSO
                    124: .Xr expand 1 ,
                    125: .Xr nroff 1 ,
                    126: .Xr tbl 1
                    127: .Sh HISTORY
                    128: A
1.4       aaron     129: .Nm
                    130: command appeared in
1.1       deraadt   131: .At v6 .