From 904377a8e5db4840c2371d921f42c8cb75e33a9f Mon Sep 17 00:00:00 2001 From: dds Date: Fri, 11 Mar 2005 07:40:17 +0000 Subject: [PATCH] Add examples for tcplisten, data scattering, and file views. Improve formatting of existing examples. --- usr.sbin/mount_portalfs/mount_portalfs.8 | 39 +++++++++++++++++++++--- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/usr.sbin/mount_portalfs/mount_portalfs.8 b/usr.sbin/mount_portalfs/mount_portalfs.8 index ac536b1c13e2..2d5b602a05d4 100644 --- a/usr.sbin/mount_portalfs/mount_portalfs.8 +++ b/usr.sbin/mount_portalfs/mount_portalfs.8 @@ -33,7 +33,7 @@ .\" @(#)mount_portal.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd March 10, 2005 +.Dd March 11, 2005 .Dt MOUNT_PORTALFS 8 .Os .Sh NAME @@ -159,13 +159,44 @@ server. .Pp .Dl "head -1 /p/tcp/mx1.freebsd.org/smtp" .Pp +Implement a (single-threaded) echo server: +.Pp +.Bd -unfilled -literal -offset indent +while : +do + (exec 3<>/p/tcplisten/ANY/echo && cat -u <&3 >&3) +done +.Ed +.Pp +Gather data from two sources. Verify that two remote files are identical: .Pp -.Bd -unfilled +.Bd -unfilled -literal -offset indent diff -q '/p/pipe/usr/bin/fetch -o - \\ - ftp://ftp1.freebsd.org/pub/FreeBSD/README.TXT' \\ + ftp://ftp1.freebsd.org/pub/FreeBSD/README.TXT' \\ '/p/pipe/usr/bin/fetch -o - \\ - ftp://ftp2.freebsd.org/pub/FreeBSD/README.TXT' + ftp://ftp2.freebsd.org/pub/FreeBSD/README.TXT' +.Ed +.Pp +Scatter data to two sinks. +Record a remote +.Tn CD +.Tn ISO +image and calculate its checksum: +.Pp +.Bd -unfilled -literal -offset indent +fetch -o - ftp://ftp5.freebsd.org/.../disc.iso | +tee '/p/pipe/usr/local/bin/cdrecord -' | +md5 +.Ed +.Pp +Create an +.Tn XML +view of the password file: +.Pp +.Bd -unfilled -literal -offset indent +ln -s '/p/pipe/usr/local/bin/passwd2xml /etc/passwd' \\ + /etc/passwd.xml" .Ed .Sh SEE ALSO .Xr mount 2 ,