]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - usr.bin/vis/vis.1
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.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 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)vis.1       8.4 (Berkeley) 4/19/94
33 .\" $FreeBSD$
34 .\"
35 .Dd June 25, 2004
36 .Dt VIS 1
37 .Os
38 .Sh NAME
39 .Nm vis
40 .Nd display non-printable characters in a visual format
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl cbflnostw
44 .Op Fl F Ar foldwidth
45 .Op Ar
46 .Sh DESCRIPTION
47 The
48 .Nm
49 utility is a filter for converting non-printable characters
50 into a visual representation.
51 It differs from
52 .Ql cat -v
53 in that
54 the form is unique and invertible.
55 By default, all non-graphic
56 characters except space, tab, and newline are encoded.
57 A detailed description of the
58 various visual formats is given in
59 .Xr vis 3 .
60 .Pp
61 The options are as follows:
62 .Bl -tag -width indent
63 .It Fl b
64 Turns off prepending of backslash before up-arrow control sequences
65 and meta characters, and disables the doubling of backslashes.
66 This
67 produces output which is neither invertible or precise, but does
68 represent a minimum of change to the input.
69 It is similar to
70 .Dq Li cat -v .
71 .It Fl c
72 Request a format which displays a small subset of the
73 non-printable characters using C-style backslash sequences.
74 .It Fl F
75 Causes
76 .Nm
77 to fold output lines to
78 .Ar foldwidth
79 columns (default 80), like
80 .Xr fold 1 ,
81 except
82 that a hidden newline sequence is used (which is removed
83 when inverting the file back to its original form with
84 .Xr unvis 1 ) .
85 If the last character in the encoded file does not end in a newline,
86 a hidden newline sequence is appended to the output.
87 This makes
88 the output usable with various editors and other utilities which
89 typically do not work with partial lines.
90 .It Fl f
91 Same as
92 .Fl F .
93 .It Fl l
94 Mark newlines with the visible sequence
95 .Ql \e$ ,
96 followed by the newline.
97 .It Fl n
98 Turns off any encoding, except for the fact that backslashes are
99 still doubled and hidden newline sequences inserted if
100 .Fl f
101 or
102 .Fl F
103 is selected.
104 When combined with the
105 .Fl f
106 flag,
107 .Nm
108 becomes like
109 an invertible version of the
110 .Xr fold 1
111 utility.
112 That is, the output
113 can be unfolded by running the output through
114 .Xr unvis 1 .
115 .It Fl o
116 Request a format which displays non-printable characters as
117 an octal number, \eddd.
118 .It Fl s
119 Only characters considered unsafe to send to a terminal are encoded.
120 This flag allows backspace, bell, and carriage return in addition
121 to the default space, tab and newline.
122 .It Fl t
123 Tabs are also encoded.
124 .It Fl w
125 White space (space-tab-newline) is also encoded.
126 .El
127 .Sh SEE ALSO
128 .Xr unvis 1 ,
129 .Xr vis 3
130 .Sh HISTORY
131 The
132 .Nm
133 command appeared in
134 .Bx 4.4 .
135 .Sh BUGS
136 Due to limitations in the underlying
137 .Xr vis 3
138 function, the
139 .Nm
140 utility
141 does not recognize multibyte characters, and thus may consider them to be
142 non-printable when they are in fact printable (and vice versa).