Commit | Line | Data |
---|---|---|
c8734eaa KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5325ced3 | 5 | .\" Michael Rendell. |
c8734eaa KB |
6 | .\" |
7 | .\" %sccs.include.redist.man% | |
8 | .\" | |
1d3796f1 | 9 | .\" @(#)col.1 6.8 (Berkeley) %G% |
803f9663 | 10 | .\" |
b5dc1377 CL |
11 | .Dd |
12 | .Dt COL 1 | |
0e853b88 | 13 | .Os |
b5dc1377 CL |
14 | .Sh NAME |
15 | .Nm col | |
16 | .Nd filter reverse line feeds from input | |
17 | .Sh SYNOPSIS | |
18 | .Nm col | |
19 | .Op Fl bfx | |
20 | .Op Fl l Ar num | |
21 | .Sh DESCRIPTION | |
22 | .Nm Col | |
0e853b88 CL |
23 | filters out reverse (and half reverse) line feeds so the output is |
24 | in the correct order with only forward and half forward line | |
c8734eaa KB |
25 | feeds, and replaces white-space characters with tabs where possible. |
26 | This can be useful in processing the output of | |
b5dc1377 | 27 | .Xr nroff 1 |
c8734eaa | 28 | and |
b5dc1377 CL |
29 | .Xr tbl 1 . |
30 | .Pp | |
31 | .Nm Col | |
c8734eaa | 32 | reads from standard input and writes to standard output. |
b5dc1377 | 33 | .Pp |
c8734eaa | 34 | The options are as follows: |
0e853b88 CL |
35 | .Bl -tag -width "-lnum" |
36 | .It Fl b | |
1d3796f1 | 37 | Do not output any backspaces, printing only the last character |
c8734eaa | 38 | written to each column position. |
0e853b88 | 39 | .It Fl f |
c8734eaa KB |
40 | Forward half line feeds are permitted (``fine'' mode). |
41 | Normally characters printed on a half line boundary are printed | |
42 | on the following line. | |
0e853b88 | 43 | .It Fl x |
c8734eaa | 44 | Output multiple spaces instead of tabs. |
0e853b88 | 45 | .It Fl l Ns Ar num |
c8734eaa | 46 | Buffer at least |
b5dc1377 | 47 | .Ar num |
c8734eaa KB |
48 | lines in memory. |
49 | By default, 128 lines are buffered. | |
0e853b88 | 50 | .El |
b5dc1377 | 51 | .Pp |
c8734eaa | 52 | The control sequences for carriage motion that |
b5dc1377 | 53 | .Nm col |
c8734eaa KB |
54 | understands and their decimal values are listed in the following |
55 | table: | |
b5dc1377 | 56 | .Pp |
0e853b88 CL |
57 | .Bl -tag -width "carriage return" -compact |
58 | .It ESC\-7 | |
c8734eaa | 59 | reverse line feed (escape then 7) |
0e853b88 | 60 | .It ESC\-8 |
c8734eaa | 61 | half reverse line feed (escape then 8) |
0e853b88 | 62 | .It ESC\-9 |
c8734eaa | 63 | half forward line feed (escape then 9) |
0e853b88 | 64 | .It backspace |
c8734eaa | 65 | moves back one column (8); ignored in the first column |
0e853b88 | 66 | .It carriage return |
c8734eaa | 67 | (13) |
0e853b88 | 68 | .It newline |
c8734eaa | 69 | forward line feed (10); also does carriage return |
0e853b88 | 70 | .It shift in |
c8734eaa | 71 | shift to normal character set (15) |
0e853b88 | 72 | .It shift out |
c8734eaa | 73 | shift to alternate character set (14) |
0e853b88 | 74 | .It space |
c8734eaa | 75 | moves forward one column (32) |
0e853b88 | 76 | .It tab |
c8734eaa | 77 | moves forward to next tab stop (9) |
0e853b88 | 78 | .It vertical tab |
c8734eaa | 79 | reverse line feed (11) |
0e853b88 | 80 | .El |
b5dc1377 | 81 | .Pp |
c8734eaa KB |
82 | All unrecognized control characters and escape sequences are |
83 | discarded. | |
b5dc1377 CL |
84 | .Pp |
85 | .Nm Col | |
c8734eaa KB |
86 | keeps track of the character set as characters are read and makes |
87 | sure the character set is correct when they are output. | |
b5dc1377 | 88 | .Pp |
c8734eaa | 89 | If the input attempts to back up to the last flushed line, |
b5dc1377 | 90 | .Nm col |
c8734eaa | 91 | will display a warning message. |
b5dc1377 CL |
92 | .Sh SEE ALSO |
93 | .Xr expand 1 , | |
94 | .Xr nroff 1 , | |
95 | .Xr tbl 1 | |
96 | .Sh HISTORY | |
97 | A | |
98 | .Nm col | |
99 | command | |
1d3796f1 | 100 | appeared in Version 6 AT&T UNIX. |