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