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