Add examples for tcplisten, data scattering, and file views.

Improve formatting of existing examples.
This commit is contained in:
dds 2005-03-11 07:40:17 +00:00
parent 86f7da9248
commit 904377a8e5

View File

@ -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 ,