VIS(1) — HP-UX
NAME
vis, inv − make unprintable characters in a file visible or invisible
SYNOPSIS
vis [ −n ] [ −s ] [ −t ] [ −u ] [ −x ] file ...
inv [ −n ] [ −s ] [ −t ] [ −u ] [ −x ] file ...
DESCRIPTION
Vis reads characters from each file in sequence and writes them to the standard output, converting those which are not printable into a visible form. Inv performs the inverse function, reading printable characters from each file and writing them, returned if appropriate to non-printable form, to standard out.
Non-printable characters are represented using C-like escape conventions:
\\ backslash
\b backspace
\e escape
\f form-feed
\n new-line
\r carriage return
\s space
\t horizontal tab
\v vertical tab
\n the 8-bit character whose ASCII code is the 3-digit octal number n.
\xn the 8-bit character whose ASCII code is the 2-digit hexadecimal number n.
Space, horizontal tab, and new line may be treated as printable (and therefore passed unscathed to the output) or non-printable dependent on the options selected. Backslash, although printable, is expanded by vis, to a pair of backslashes so that when passed back through inv, it can be mapped back to a single backslash.
If no input file is given, or if the argument − is encountered, vis and inv read from the standard input file.
The options are:
−n causes new-line, space, and horizontal tab to be treated as non-printable characters. Thus vis expands them visibly as \n, \s, and \t, rather passing them directly to the output. Inv discards these character, expecting only the printable expansions. New-line characters are inserted by vis every 16 characters so that the output will be in form acceptable for most editors.
−s makes vis and inv silent about non-existent files, identical input and output, and write errors. Normally, no input file may be the same as the output file unless it is a special file.
−t treats horizontal tab and space as non-printable characters, in the same manner in which −n options treats them.
−u causes output to be unbuffered (character-by-character); normally, output is buffered.
−x causes vis output to be in hexadecimal form rather than the default octal form. Either form is accepted to inv as input.
AUTHOR
Vis was developed by the Hewlett-Packard Company.
SEE ALSO
WARNING
Command formats such as
vis file1 file2 >file1
will cause the original data in file1 to be lost.
INTERNATIONAL SUPPORT
8-bit and 16-bit data, customs, messages
Hewlett-Packard Company — Version B.1, May 11, 2021