]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - usr.bin/vis/vis.1
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.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$
30 .\"
31 .Dd June 25, 2004
32 .Dt VIS 1
33 .Os
34 .Sh NAME
35 .Nm vis
36 .Nd display non-printable characters in a visual format
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl cbflnostw
40 .Op Fl F Ar foldwidth
41 .Op Ar
42 .Sh DESCRIPTION
43 The
44 .Nm
45 utility is a filter for converting non-printable characters
46 into a visual representation.
47 It differs from
48 .Ql cat -v
49 in that
50 the form is unique and invertible.
51 By default, all non-graphic
52 characters except space, tab, and newline are encoded.
53 A detailed description of the
54 various visual formats is given in
55 .Xr vis 3 .
56 .Pp
57 The options are as follows:
58 .Bl -tag -width indent
59 .It Fl b
60 Turns off prepending of backslash before up-arrow control sequences
61 and meta characters, and disables the doubling of backslashes.
62 This
63 produces output which is neither invertible or precise, but does
64 represent a minimum of change to the input.
65 It is similar to
66 .Dq Li cat -v .
67 .It Fl c
68 Request a format which displays a small subset of the
69 non-printable characters using C-style backslash sequences.
70 .It Fl F
71 Causes
72 .Nm
73 to fold output lines to
74 .Ar foldwidth
75 columns (default 80), like
76 .Xr fold 1 ,
77 except
78 that a hidden newline sequence is used (which is removed
79 when inverting the file back to its original form with
80 .Xr unvis 1 ) .
81 If the last character in the encoded file does not end in a newline,
82 a hidden newline sequence is appended to the output.
83 This makes
84 the output usable with various editors and other utilities which
85 typically do not work with partial lines.
86 .It Fl f
87 Same as
88 .Fl F .
89 .It Fl l
90 Mark newlines with the visible sequence
91 .Ql \e$ ,
92 followed by the newline.
93 .It Fl n
94 Turns off any encoding, except for the fact that backslashes are
95 still doubled and hidden newline sequences inserted if
96 .Fl f
97 or
98 .Fl F
99 is selected.
100 When combined with the
101 .Fl f
102 flag,
103 .Nm
104 becomes like
105 an invertible version of the
106 .Xr fold 1
107 utility.
108 That is, the output
109 can be unfolded by running the output through
110 .Xr unvis 1 .
111 .It Fl o
112 Request a format which displays non-printable characters as
113 an octal number, \eddd.
114 .It Fl s
115 Only characters considered unsafe to send to a terminal are encoded.
116 This flag allows backspace, bell, and carriage return in addition
117 to the default space, tab and newline.
118 .It Fl t
119 Tabs are also encoded.
120 .It Fl w
121 White space (space-tab-newline) is also encoded.
122 .El
123 .Sh SEE ALSO
124 .Xr unvis 1 ,
125 .Xr vis 3
126 .Sh HISTORY
127 The
128 .Nm
129 command appeared in
130 .Bx 4.4 .
131 .Sh BUGS
132 Due to limitations in the underlying
133 .Xr vis 3
134 function, the
135 .Nm
136 utility
137 does not recognize multibyte characters, and thus may consider them to be
138 non-printable when they are in fact printable (and vice versa).