summaryrefslogtreecommitdiff
path: root/usr.bin/lam
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2001-12-01 20:31:37 +0000
committerwiz <wiz@NetBSD.org>2001-12-01 20:31:37 +0000
commit4283bd539468a2f731bfd8bab2456bf5d80d85a2 (patch)
tree06c50f4497b60a2958a3a12835d9e508e5449837 /usr.bin/lam
parentcb292d0d1e3027c78f4d7f5d7da0f753e98d9c9b (diff)
mdocify
Diffstat (limited to 'usr.bin/lam')
-rw-r--r--usr.bin/lam/lam.1122
1 files changed, 62 insertions, 60 deletions
diff --git a/usr.bin/lam/lam.1 b/usr.bin/lam/lam.1
index ddcb263cffc..5f0ffae564d 100644
--- a/usr.bin/lam/lam.1
+++ b/usr.bin/lam/lam.1
@@ -1,4 +1,4 @@
-.\" $NetBSD: lam.1,v 1.2 1994/11/14 20:27:40 jtc Exp $
+.\" $NetBSD: lam.1,v 1.3 2001/12/01 20:31:37 wiz Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -33,97 +33,99 @@
.\"
.\" @(#)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" -compact
+.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
+.Bd -literal -offset indent
lam file1 file2 file3 file4
-.NC
+.Ed
+.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
+.Bd -literal -offset indent
lam \- \- < file
-.NC
-and a form letter with substitutions keyed by `@' can be done with
-.IC
+.Ed
+.Pp
+and a form letter with substitutions keyed by
+.Sq \&@
+can be done with
+.Bd -literal -offset indent
lam \-t @ letter changes
-.NC
-.SH SEE ALSO
-join(1), pr(1), printf(3)
+.Ed
+.Sh SEE ALSO
+.Xr join 1 ,
+.Xr pr 1 ,
+.Xr printf 3