summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-04-21 00:51:50 +0000
committermillert <millert@openbsd.org>2003-04-21 00:51:50 +0000
commit66d01902d70b78f150aadcd2dfcc82d1acf66efc (patch)
tree7e9a338608d8cb37588d6cb938b7cb02c9b2f7f1
parentUse strlcpy() and snprintf() in favor of inline strcpy() and sprintf(). (diff)
downloadwireguard-openbsd-66d01902d70b78f150aadcd2dfcc82d1acf66efc.tar.xz
wireguard-openbsd-66d01902d70b78f150aadcd2dfcc82d1acf66efc.zip
mdoc version from NetBSD (wiz) with minor modifications and local changes.
-rw-r--r--usr.bin/lam/lam.1124
1 files changed, 60 insertions, 64 deletions
diff --git a/usr.bin/lam/lam.1 b/usr.bin/lam/lam.1
index 92246cab6eb..5565d7914ec 100644
--- a/usr.bin/lam/lam.1
+++ b/usr.bin/lam/lam.1
@@ -1,5 +1,5 @@
-.\" $OpenBSD: lam.1,v 1.3 2002/11/14 02:57:27 deraadt Exp $
-.\" $NetBSD: lam.1,v 1.2 1994/11/14 20:27:40 jtc Exp $
+.\" $OpenBSD: lam.1,v 1.4 2003/04/21 00:51:50 millert Exp $
+.\" $NetBSD: lam.1,v 1.4 2002/02/08 01:36:25 ross Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -34,97 +34,93 @@
.\"
.\" @(#)lam.1 8.1 (Berkeley) 6/6/93
.\"
-.TH LAM 1 "June 6, 1993"
-.UC 4
-.SH NAME
-lam \- laminate files
-.SH SYNOPSIS
-.B lam [ \-[fp]
-min.max
-.B ] [ \-s
-sepstring
-.B ] [ \-t
-c
-.B ]
-file ...
-.SH DESCRIPTION
-.I Lam
+.Dd December 1, 2001
+.Dt LAM 1
+.Os
+.Sh NAME
+.Nm lam
+.Nd laminate files
+.Sh SYNOPSIS
+.Nm
+.Op Fl f Ar min.max
+.Op Fl p Ar min.max
+.Op Fl s Ar sepstring
+.Op Fl t Ar c
+.Ar file ...
+.Sh DESCRIPTION
+.Nm
copies the named files side by side onto the standard output.
The
-.IR n -th
+.Em n Ns -th
input lines from the input
-.IR file s
+.Ar files
are considered fragments of the single long
-.IR n -th
+.Em n Ns -th
output line into which they are assembled.
-The name `\fB\-\fP' means the standard input, and may be repeated.
-.PP
+The name
+.Dq \&-
+means the standard input, and may be repeated.
+.Pp
Normally, each option affects only the
-.I file
+.Ar file
after it.
If the option letter is capitalized it affects all subsequent files
until it appears again uncapitalized.
The options are described below.
-.IP \fB\-f\fP\ min.max
+.Bl -tag -width "-s sepstring"
+.It Fl f Ar min.max
Print line fragments according to the format string
-.IR min.max ,
+.Ar min.max ,
where
-.I min
+.Ar min
is the minimum field width and
-.I max
+.Ar max
the maximum field width.
If
-.I min
+.Ar min
begins with a zero, zeros will be added to make up the field width,
-and if it begins with a `\-', the fragment will be left-adjusted
+and if it begins with a
+.Sq \&- ,
+the fragment will be left-adjusted
within the field.
-.IP \fB\-p\fP\ min.max
-Like \fB\-f\fP,
+.It Fl p Ar min.max
+Like
+.Fl f ,
but pad this file's field when end-of-file is reached
and other files are still active.
-.IP \fB\-s\fP\ sepstring
+.It Fl s Ar sepstring
Print
-.I sepstring
+.Ar sepstring
before printing line fragments from the next file.
This option may appear after the last file.
-.IP \fB\-t\fP\ c
+.It Fl t Ar c
The input line terminator is
-.I c
+.Ar c
instead of a newline.
The newline normally appended to each output line is omitted.
-.PP
+.El
+.Pp
To print files simultaneously for easy viewing use
-.IR pr (1).
-.SH EXAMPLES
-.de IC
-.IP
-.ss 36
-.ft B
-..
-.de NC
-.br
-.ss 12
-.PP
-..
-.PP
+.Xr pr 1 .
+.Sh EXAMPLES
The command
-.IC
-$ lam file1 file2 file3 file4
-.NC
+.Dl $ lam file1 file2 file3 file4
+.Pp
joins 4 files together along each line.
To merge the lines from four different files use
-.IC
+.Bd -literal -offset indent
$ lam file1 \-S "\\
-.br
" file2 file3 file4
-.NC
+.Ed
+.Pp
Every 2 lines of a file may be joined on one line with
-.IC
-$ lam \- \- < file
-.NC
-and a form letter with substitutions keyed by `@' can be done with
-.IC
-$ lam \-t @ letter changes
-.NC
-.SH SEE ALSO
-join(1), pr(1), printf(3)
+.Dl $ lam \- \- \*(Lt file
+.Pp
+and a form letter with substitutions keyed by
+.Sq \&@
+can be done with
+.Dl $ lam \-t @ letter changes
+.Sh SEE ALSO
+.Xr join 1 ,
+.Xr pr 1 ,
+.Xr printf 1