[BACK]Return to vis.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / vis

Annotation of src/usr.bin/vis/vis.1, Revision 1.2

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