vis [-bcfhlMmNnoSstw] [-e extra] [-F foldwidth] [file ...]
convert non-printable characters into a visual representation. It differs from cat -v
in that the form is
unique and invertible. By default, all non-graphic characters except space, tab, and newline are encoded. A detailed description of
the various visual formats is given in vis(3).
-b Turns off prepending of backslash before up-arrow control sequences and meta characters, and disables the doubling of
backslashes. This produces output which is neither invertible or precise, but does represent a minimum of change to the
input. It is similar to "cat -v". (VIS_NOSLASH)
|
LC_CTYPE
Specify the locale of the input data. Set to C if the input data locale is unknown.
EXAMPLES
Visualize characters encoding white spaces and tabs:$ echo -e "\x10\n\t" | vis -w -t \^P\012\011\012 Same as above but using `\$' for newline followed by an actual newline: $ echo -e "\x10\n\t" | vis -w -t -l \^P\$ \011\$ Visualize string using URI encoding: $ echo http://www.freebsd.org | vis -h http%3a%2f%2fwww.freebsd.org%0aSEE unvis(1), svis(3), vis(3)