]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.bin/col/README
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / usr.bin / col / README
1 #       @(#)README      8.1 (Berkeley) 6/6/93
2 #
3 # $FreeBSD$
4
5 col - filter out reverse line feeds.
6
7 Options are:
8         -b      do not print any backspaces (last character written is printed)
9         -f      allow half line feeds in output, by default characters between
10                 lines are pushed to the line below
11         -p      force unknown control sequences to be passed through unchanged
12         -x      do not compress spaces into tabs.
13         -l num  keep (at least) num lines in memory, 128 are kept by default
14
15 In the 32V source code to col(1) the default behavior was to NOT compress
16 spaces into tabs.  There was a -h option which caused it to compress spaces
17 into tabs.  There was no -x flag.
18
19 The 32V documentation, however, was consistent with the SVID (actually, V7
20 at the time) and documented a -x flag (as defined above) while making no
21 mention of a -h flag.  Just before 4.3BSD went out, CSRG updated the manual
22 page to reflect the way the code worked.  Suspecting that this was probably
23 the wrong way to go, this version adopts the SVID defaults, and no longer
24 documents the -h option.
25
26 Known differences between AT&T's col and this one (# is delimiter):
27         Input                   AT&T col                this col
28         #\nabc\E7def\n#         #   def\nabc\r#         #   def\nabc\n#
29         #a#                     ##                      #a\n#
30                 - last line always ends with at least one \n (or \E9)
31         #1234567 8\n#           #1234567\t8\n#          #1234567 8\n#
32                 - single space not expanded to tab
33      -f #a\E8b\n#               #ab\n#                  # b\E9\ra\n#
34                 - can back up past first line (as far as you want) so you
35                   *can* have a super script on the first line
36         #\E9_\ba\E8\nb\n#       #\n_\bb\ba\n#           #\n_\ba\bb\n#
37                 - always print last character written to a position,
38                   AT&T col claims to do this but doesn't.
39
40 If a character is to be placed on a line that has been flushed, a warning
41 is produced (the AT&T col is silent).   The -l flag (not in AT&T col) can
42 be used to increase the number of lines buffered to avoid the problem.
43
44 General algorithm: a limited number of lines are buffered in a linked
45 list.  When a printable character is read, it is put in the buffer of
46 the current line along with the column it's supposed to be in.  When
47 a line is flushed, the characters in the line are sorted according to
48 column and then printed.