Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vis Add examples (Fernando Apesteguía at FreeBSD)



details:   https://anonhg.NetBSD.org/src/rev/a8d13337f95a
branches:  trunk
changeset: 959558:a8d13337f95a
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 18 18:27:24 2021 +0000

description:
Add examples (Fernando Apesteguía at FreeBSD)

diffstat:

 usr.bin/vis/vis.1 |  23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r dfeaf22624bc -r a8d13337f95a usr.bin/vis/vis.1
--- a/usr.bin/vis/vis.1 Thu Feb 18 18:06:02 2021 +0000
+++ b/usr.bin/vis/vis.1 Thu Feb 18 18:27:24 2021 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: vis.1,v 1.23 2015/05/24 19:42:39 christos Exp $
+.\"    $NetBSD: vis.1,v 1.24 2021/02/18 18:27:24 christos Exp $
 .\"
 .\" Copyright (c) 1989, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"     @(#)vis.1      8.4 (Berkeley) 4/19/94
 .\"
-.Dd May 24, 2015
+.Dd February 18, 2021
 .Dt VIS 1
 .Os
 .Sh NAME
@@ -171,6 +171,25 @@
 Specify the locale of the input data.
 Set to C if the input data locale is unknown.
 .El
+.Sh EXAMPLES
+Visualize characters encoding white spaces and tabs:
+.Bd -literal -offset indent
+$ printf "\\x10\\n\\t\\n" | vis -w -t
+\\^P\\012\\011\\012
+.Ed
+.Pp
+Same as above but using `\\$' for newline followed by an actual newline:
+.Bd -literal -offset indent
+$ printf "\\x10\\n\\t\\n" | vis -w -t -l
+\\^P\\$
+\\011\\$
+.Ed
+.Pp
+Visualize string using URI encoding:
+.Bd -literal -offset indent
+$ printf http://www.freebsd.org | vis -h
+http%3a%2f%2fwww.freebsd.org
+.Ed
 .Sh SEE ALSO
 .Xr unvis 1 ,
 .Xr svis 3 ,



Home | Main Index | Thread Index | Old Index