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 | |
5 | .\" Michael Rendell of the Memorial University of Newfoundland. | |
6 | .\" | |
7 | .\" %sccs.include.redist.man% | |
8 | .\" | |
dd9e2e8d | 9 | .\" @(#)col.1 6.5 (Berkeley) %G% |
803f9663 | 10 | .\" |
b5dc1377 CL |
11 | .Dd |
12 | .Dt COL 1 | |
dd9e2e8d | 13 | .Os BSD 4.4 |
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 | |
c8734eaa KB |
23 | filters out reverse (and half reverse) line feeds so that the output is |
24 | in the correct order and contains only forward and half forward line | |
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: |
b5dc1377 CL |
35 | .Tw Fl |
36 | .Tp Fl b | |
c8734eaa KB |
37 | Do not output any backspaces \- print only the last character |
38 | written to each column position. | |
b5dc1377 | 39 | .Tp 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. | |
b5dc1377 | 43 | .Tp Fl x |
c8734eaa | 44 | Output multiple spaces instead of tabs. |
b5dc1377 CL |
45 | .Tp Cx Fl l |
46 | .Cx Ar num | |
47 | .Cx | |
c8734eaa | 48 | Buffer at least |
b5dc1377 | 49 | .Ar num |
c8734eaa KB |
50 | lines in memory. |
51 | By default, 128 lines are buffered. | |
b5dc1377 CL |
52 | .Tp |
53 | .Pp | |
c8734eaa | 54 | The control sequences for carriage motion that |
b5dc1377 | 55 | .Nm col |
c8734eaa KB |
56 | understands and their decimal values are listed in the following |
57 | table: | |
b5dc1377 CL |
58 | .Pp |
59 | .Dw carriage\ return | |
60 | .Di L | |
61 | .Dp ESC\-7 | |
c8734eaa | 62 | reverse line feed (escape then 7) |
b5dc1377 | 63 | .Dp ESC\-8 |
c8734eaa | 64 | half reverse line feed (escape then 8) |
b5dc1377 | 65 | .Dp ESC\-9 |
c8734eaa | 66 | half forward line feed (escape then 9) |
b5dc1377 | 67 | .Dp backspace |
c8734eaa | 68 | moves back one column (8); ignored in the first column |
b5dc1377 | 69 | .Dp carriage return |
c8734eaa | 70 | (13) |
b5dc1377 | 71 | .Dp newline |
c8734eaa | 72 | forward line feed (10); also does carriage return |
b5dc1377 | 73 | .Dp shift in |
c8734eaa | 74 | shift to normal character set (15) |
b5dc1377 | 75 | .Dp shift out |
c8734eaa | 76 | shift to alternate character set (14) |
b5dc1377 | 77 | .Dp space |
c8734eaa | 78 | moves forward one column (32) |
b5dc1377 | 79 | .Dp tab |
c8734eaa | 80 | moves forward to next tab stop (9) |
b5dc1377 | 81 | .Dp vertical tab |
c8734eaa | 82 | reverse line feed (11) |
b5dc1377 CL |
83 | .Dp |
84 | .Pp | |
c8734eaa KB |
85 | All unrecognized control characters and escape sequences are |
86 | discarded. | |
b5dc1377 CL |
87 | .Pp |
88 | .Nm Col | |
c8734eaa KB |
89 | keeps track of the character set as characters are read and makes |
90 | sure the character set is correct when they are output. | |
b5dc1377 | 91 | .Pp |
c8734eaa | 92 | If the input attempts to back up to the last flushed line, |
b5dc1377 | 93 | .Nm col |
c8734eaa | 94 | will display a warning message. |
b5dc1377 CL |
95 | .Sh SEE ALSO |
96 | .Xr expand 1 , | |
97 | .Xr nroff 1 , | |
98 | .Xr tbl 1 | |
99 | .Sh HISTORY | |
100 | A | |
101 | .Nm col | |
102 | command | |
103 | appeared in Version 6 AT&T UNIX. The BSD | |
104 | .Nm col | |
105 | is derived from code written by Michael Rendell. |