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