1.\" Copyright (c) 1989, 1991 The Regents of the University of California. 2.\" 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 5.2 (Berkeley) 4/23/91 33.\" 34.Dd April 23, 1991 35.Dt VIS 1 36.Os 37.Sh NAME 38.Nm vis 39.Nd display non-printable characters in a visual format 40.Sh SYNOPSIS 41.Nm vis 42.Op Fl cbflnostw 43.Op Fl F Ar foldwidth 44.Op Ar file ... 45.Sh DESCRIPTION 46.Nm Vis 47is a filter for converting non-printable characters 48into a visual representation. It differs from 49.Ql cat -v 50in that 51the form is unique and invertible. By default, all non-graphic 52characters except space, tab, and newline are encoded. 53A detailed description of the 54various visual formats is given in 55.Xr vis 3 . 56.Pp 57Options supported by 58.Nm vis : 59.Bl -tag -width Ds 60.It Fl b 61Turns off prepending of backslash before up-arrow control sequences 62and meta characters, and disables the doubling of backslashes. This 63produces output which is neither invertible or precise, but does 64represent a minimum of change to the input. It is similar to 65.Dq Li cat -v . 66.It Fl c 67Request a format which displays a small subset of the 68non-printable characters using C-style backslash sequences. 69.It Fl F 70Causes 71.Nm vis 72to fold output lines to foldwidth columns (default 80), like 73.Xr fold 1 , 74except 75that a hidden newline sequence is used, (which is removed 76when inverting the file back to its original form with 77.Xr unvis 1 ) . 78If the last character in the encoded file does not end in a newline, 79a hidden newline sequence is appended to the output. 80This makes 81the output usuable with various editors and other utilities which 82typically don't work with partial lines. 83.It Fl f 84Same as 85.Fl F . 86.It Fl l 87Mark newlines with the visable sequence 88.Ql \e$ , 89followed by the newline. 90.It Fl n 91Turns off any encoding, except for the fact that backslashes are 92still doubled and hidden newline sequences inserted if 93.Fl f 94or 95.Fl F 96is selected. When combined with the 97.Fl f 98flag, 99.Nm vis 100becomes like 101an invertible version of the 102.Xr fold 1 103utility. That is, the output 104can be unfolded by running the output through 105.It Fl o 106Request a format which displays non-printable characters as 107an octal number, \eddd. 108.It Fl s 109Only characters considered unsafe to send to a terminal are encoded. 110This flag allows backspace, bell, and carriage return in addition 111to the default space, tab and newline. 112.Xr unvis 1 . 113.It Fl t 114Tabs are also encoded. 115.It Fl w 116White space (space-tab-newline) is also encoded. 117.El 118.Sh SEE ALSO 119.Xr unvis 1 120.Xr vis 3 121.Sh HISTORY 122The 123.Nm 124command is 125.Ud . 126