[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.14

1.14    ! djm         1: .\"    $OpenBSD: vis.1,v 1.13 2009/08/16 09:41:08 sobrado 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.
1.8       millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"     @(#)vis.1      8.4 (Berkeley) 4/19/94
                     32: .\"
1.14    ! djm        33: .Dd $Mdocdate: August 16 2009 $
1.1       deraadt    34: .Dt VIS 1
1.5       aaron      35: .Os
1.1       deraadt    36: .Sh NAME
                     37: .Nm vis
                     38: .Nd display non-printable characters in a visual format
                     39: .Sh SYNOPSIS
                     40: .Nm vis
1.14    ! djm        41: .Op Fl abcfhlnostw
1.10      jmc        42: .Op Fl F Ar foldwidth
1.13      sobrado    43: .Op Ar
1.1       deraadt    44: .Sh DESCRIPTION
1.6       aaron      45: .Nm
1.1       deraadt    46: is a filter for converting non-printable characters
1.6       aaron      47: into a visual representation.
                     48: It differs from
                     49: .Ic cat -v
1.1       deraadt    50: in that
1.7       pjanzen    51: the form can be unique and invertible.
                     52: By default, all non-printing
                     53: characters except space, tab, and newline are encoded,
                     54: as are any meta-characters
                     55: .Pq eighth bit set .
1.1       deraadt    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
1.14    ! djm        62: .It Fl a
        !            63: Encode all characters, whether originally visible or not.
1.1       deraadt    64: .It Fl b
                     65: Turns off prepending of backslash before up-arrow control sequences
1.6       aaron      66: and meta-characters, and disables the doubling of backslashes.
                     67: This produces output which is neither invertible nor precise, but does
                     68: represent a minimum of change to the input.
                     69: It is similar to
                     70: .Ic cat -v .
1.1       deraadt    71: .It Fl c
                     72: Request a format which displays a small subset of the
                     73: non-printable characters using C-style backslash sequences.
1.10      jmc        74: .It Fl F Ar foldwidth
1.1       deraadt    75: Causes
1.6       aaron      76: .Nm
1.9       avsm       77: to fold output lines to
                     78: .Ar foldwidth
1.10      jmc        79: columns, like
1.1       deraadt    80: .Xr fold 1 ,
                     81: except
                     82: that a hidden newline sequence is used, (which is removed
                     83: when inverting the file back to its original form with
                     84: .Xr unvis 1 ) .
                     85: If the last character in the encoded file does not end in a newline,
                     86: a hidden newline sequence is appended to the output.
                     87: This makes
                     88: the output usable with various editors and other utilities which
                     89: typically don't work with partial lines.
                     90: .It Fl f
1.10      jmc        91: Like
                     92: .Fl F ,
                     93: except output is always folded to 80 columns.
1.14    ! djm        94: .It Fl h
        !            95: Request a format which displays non-printable characters as
        !            96: a hexadecimal number, \exdd.
1.1       deraadt    97: .It Fl l
                     98: Mark newlines with the visible sequence
                     99: .Ql \e$ ,
                    100: followed by the newline.
                    101: .It Fl n
                    102: Turns off any encoding, except for the fact that backslashes are
                    103: still doubled and hidden newline sequences inserted if
                    104: .Fl f
                    105: or
                    106: .Fl F
1.6       aaron     107: is selected.
                    108: When combined with the
1.1       deraadt   109: .Fl f
                    110: flag,
1.6       aaron     111: .Nm
1.1       deraadt   112: becomes like
                    113: an invertible version of the
                    114: .Xr fold 1
1.6       aaron     115: utility.
                    116: That is, the output
1.4       aaron     117: can be unfolded by running the output through
                    118: .Xr unvis 1 .
1.1       deraadt   119: .It Fl o
                    120: Request a format which displays non-printable characters as
                    121: an octal number, \eddd.
                    122: .It Fl s
                    123: Only characters considered unsafe to send to a terminal are encoded.
                    124: This flag allows backspace, bell, and carriage return in addition
1.7       pjanzen   125: to the default space, tab, and newline.
                    126: Meta-characters that are considered graphic characters by
                    127: .Xr isgraph 3
                    128: are not encoded.
1.1       deraadt   129: .It Fl t
                    130: Tabs are also encoded.
                    131: .It Fl w
                    132: White space (space-tab-newline) is also encoded.
                    133: .El
                    134: .Sh SEE ALSO
                    135: .Xr unvis 1 ,
                    136: .Xr vis 3
                    137: .Sh HISTORY
                    138: The
                    139: .Nm
1.3       aaron     140: command appeared in
1.1       deraadt   141: .Bx 4.4 .