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