KNF, lint, document all options, make man page consistent
[unix-history] / usr / src / usr.bin / vis / vis.1
CommitLineData
9f996d93
MT
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
0374ba61 16.\" @(#)vis.1 1.2 (Berkeley) %G%
9f996d93 17.\"
0374ba61 18.TH VIS 1 ""
9f996d93
MT
19.UC 7
20.SH NAME
21vis \- display non-printable characters in a visual format
22.SH SYNOPSIS
23.B vis
24[
0374ba61 25.B \-nwctsobfl
9f996d93
MT
26] [
27.B \-F
28foldwidth
29] [ file ... ]
30.SH DESCRIPTION
31\fIVis\fP is a filter for converting non-printable characters
32into a visual representation. It differs from cat -v in that
0374ba61
MT
33the form is unique and invertible. By default, all non-graphic
34characters except space, tab, and newline are encoded.
35A detailed description of the
36various visual formats is given in vis(3).
9f996d93 37.SH OPTIONS
9f996d93
MT
38.IP -c
39Request a format which displays a small subset of the
40non-printable characters using C-style backslash sequences.
9f996d93
MT
41.IP -o
42Request a format which displays non-printable characters as
0374ba61
MT
43an octal number, \\ddd.
44.IP -t
45Tabs are also encoded.
9f996d93 46.IP -w
0374ba61
MT
47White space (space-tab-newline) is also encoded.
48.IP -s
49Only characters considered unsafe to send to a terminal are encoded.
50This flag allows backspace, bell, and carriage return in addition
51to the default space, tab and newline.
9f996d93
MT
52.IP -f
53and
54.IP -F
55Causes
56.B vis
57to fold output lines to foldwidth columns (default 80), like fold(1), except
0374ba61
MT
58that a hidden newline sequence is used, (which is removed
59when inverting the file back to its original form with unvis(1)).
9f996d93 60If the last character in the encoded file does not end in a newline,
0374ba61
MT
61a hidden newline sequence is appended to the output.
62This makes
63the output usuable with various editors and other utilities which
64typically don't work with partial lines.
9f996d93 65.IP -n
0374ba61
MT
66Turns off any encoding, except for the fact that backslashes are
67still doubled and hidden newline sequences inserted if -f or -F
68is selected. When combined with the -f flag, vis becomes like
69an invertible version of the fold(1) utility. That is, the output
70can be unfolded by running the output through unvis(1).
71.IP -b
72Turns off prepending of backslash before up-arrow control sequences
73and Meta characters, and disables the doubling of backslashes. This
74produces output which is neither invertible or precise, but does
75represent a minimum of change to the input. It is similar to cat -v.
76.IP -l
77Mark newlines with the visable sequence '\\$', followed by the newline.
9f996d93 78.SH "SEE ALSO
0374ba61 79unvis(1) vis(3)