Remove advertising header from man pages.
[dragonfly.git] / usr.bin / vis / vis.1
1 .\" Copyright (c) 1989, 1991, 1993, 1994
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)vis.1       8.4 (Berkeley) 4/19/94
29 .\" $FreeBSD: src/usr.bin/vis/vis.1,v 1.6.2.2 2002/06/21 15:30:07 charnier Exp $
30 .\" $DragonFly: src/usr.bin/vis/vis.1,v 1.2 2003/06/17 04:29:33 dillon Exp $
31 .\"
32 .Dd April 19, 1994
33 .Dt VIS 1
34 .Os
35 .Sh NAME
36 .Nm vis
37 .Nd display non-printable characters in a visual format
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl cbflnostw
41 .Op Fl F Ar foldwidth
42 .Op Ar
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility is a filter for converting non-printable characters
47 into a visual representation.  It differs from
48 .Ql cat -v
49 in that
50 the form is unique and invertible.  By default, all non-graphic
51 characters except space, tab, and newline are encoded.
52 A detailed description of the
53 various visual formats is given in
54 .Xr vis 3 .
55 .Pp
56 The options are as follows:
57 .Bl -tag -width Ds
58 .It Fl b
59 Turns off prepending of backslash before up-arrow control sequences
60 and meta characters, and disables the doubling of backslashes.  This
61 produces output which is neither invertible or precise, but does
62 represent a minimum of change to the input.  It is similar to
63 .Dq Li cat -v .
64 .It Fl c
65 Request a format which displays a small subset of the
66 non-printable characters using C-style backslash sequences.
67 .It Fl F
68 Causes
69 .Nm
70 to fold output lines to foldwidth columns (default 80), like
71 .Xr fold 1 ,
72 except
73 that a hidden newline sequence is used, (which is removed
74 when inverting the file back to its original form with
75 .Xr unvis 1 ) .
76 If the last character in the encoded file does not end in a newline,
77 a hidden newline sequence is appended to the output.
78 This makes
79 the output usable with various editors and other utilities which
80 typically don't work with partial lines.
81 .It Fl f
82 Same as
83 .Fl F .
84 .It Fl l
85 Mark newlines with the visible sequence
86 .Ql \e$ ,
87 followed by the newline.
88 .It Fl n
89 Turns off any encoding, except for the fact that backslashes are
90 still doubled and hidden newline sequences inserted if
91 .Fl f
92 or
93 .Fl F
94 is selected.  When combined with the
95 .Fl f
96 flag,
97 .Nm
98 becomes like
99 an invertible version of the
100 .Xr fold 1
101 utility.  That is, the output
102 can be unfolded by running the output through
103 .Xr unvis 1 .
104 .It Fl o
105 Request a format which displays non-printable characters as
106 an octal number, \eddd.
107 .It Fl s
108 Only characters considered unsafe to send to a terminal are encoded.
109 This flag allows backspace, bell, and carriage return in addition
110 to the default space, tab and newline.
111 .It Fl t
112 Tabs are also encoded.
113 .It Fl w
114 White space (space-tab-newline) is also encoded.
115 .El
116 .Sh SEE ALSO
117 .Xr unvis 1 ,
118 .Xr vis 3
119 .Sh HISTORY
120 The
121 .Nm
122 command appeared in
123 .Bx 4.4 .