vis(1)
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 that are not printable into a visible form. inv performs the inverse function, reading printable characters from each file, returning them to non-printable form, if appropriate, then writing them to standard output;
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.
Options
vis and inv recognize the following options:
−n Treat new-line, space, and horizontal tab as non-printable characters. Thus vis expands them visibly as \n, \s, and \t, rather than passing them directly to the output. inv discards these characters, 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 Make vis and inv silent about non-existent files, identical input and output, and write errors. Normally, no input file can be the same as the output file unless it is a special file.
−t Treat horizontal tab and space as non-printable characters in the same manner in which the −n option treats them.
−u Cause output to be unbuffered (character-by-character); normally, output is buffered.
−x Cause vis output to be in hexadecimal form rather than the default octal form. Either form is accepted to inv as input.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
International Code Set Support
Single- and multi-byte character code sets are supported.
AUTHOR
vis was developed by the HP.
SEE ALSO
WARNING
Command formats such as
vis file1 file2 >file1
cause the original data in file1 to be lost.
Hewlett-Packard Company — HP-UX Release 8.05: June 1991