xref: /freebsd/usr.bin/lam/lam.1 (revision bdcbfde31e8e9b343f113a1956384bdf30d1ed62)
19b50d902SRodney W. Grimes.\" Copyright (c) 1993
29b50d902SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
39b50d902SRodney W. Grimes.\"
49b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
59b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions
69b50d902SRodney W. Grimes.\" are met:
79b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
89b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
99b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
109b50d902SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
119b50d902SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
139b50d902SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
149b50d902SRodney W. Grimes.\"    without specific prior written permission.
159b50d902SRodney W. Grimes.\"
169b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
179b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
189b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
199b50d902SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
209b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
219b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
229b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
239b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
249b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
259b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
269b50d902SRodney W. Grimes.\" SUCH DAMAGE.
279b50d902SRodney W. Grimes.\"
2821223660SAllan Jude.Dd April 7, 2015
29df899658SPhilippe Charnier.Dt LAM 1
30df899658SPhilippe Charnier.Os
31df899658SPhilippe Charnier.Sh NAME
32df899658SPhilippe Charnier.Nm lam
33df899658SPhilippe Charnier.Nd laminate files
34df899658SPhilippe Charnier.Sh SYNOPSIS
35df899658SPhilippe Charnier.Nm
36d0353b83SRuslan Ermilov.Op Fl f Ar min . Ns Ar max
37df899658SPhilippe Charnier.Op Fl s Ar sepstring
38df899658SPhilippe Charnier.Op Fl t Ar c
3947dec781SRuslan Ermilov.Ar
408fe908efSRuslan Ermilov.Nm
41d0353b83SRuslan Ermilov.Op Fl p Ar min . Ns Ar max
42df899658SPhilippe Charnier.Op Fl s Ar sepstring
43df899658SPhilippe Charnier.Op Fl t Ar c
4447dec781SRuslan Ermilov.Ar
45df899658SPhilippe Charnier.Sh DESCRIPTION
46e8937ba0SPhilippe CharnierThe
47e8937ba0SPhilippe Charnier.Nm
48e8937ba0SPhilippe Charnierutility copies the named files side by side onto the standard output.
499b50d902SRodney W. GrimesThe
50df899658SPhilippe Charnier.Em n-th
519b50d902SRodney W. Grimesinput lines from the input
52df899658SPhilippe Charnier.Ar files
539b50d902SRodney W. Grimesare considered fragments of the single long
54df899658SPhilippe Charnier.Em n-th
559b50d902SRodney W. Grimesoutput line into which they are assembled.
569b50d902SRodney W. GrimesThe name `\fB\-\fP' means the standard input, and may be repeated.
57df899658SPhilippe Charnier.Pp
58df899658SPhilippe Charnier.Bl -tag -width indent
59*07372194SAllan Jude.It Fl f Ar min . Ns Ar max , Fl F Ar min . Ns Ar max
609b50d902SRodney W. GrimesPrint line fragments according to the format string
61d0353b83SRuslan Ermilov.Ar min . Ns Ar max ,
629b50d902SRodney W. Grimeswhere
63df899658SPhilippe Charnier.Ar min
649b50d902SRodney W. Grimesis the minimum field width and
65df899658SPhilippe Charnier.Ar max
669b50d902SRodney W. Grimesthe maximum field width.
679b50d902SRodney W. GrimesIf
68df899658SPhilippe Charnier.Ar min
699b50d902SRodney W. Grimesbegins with a zero, zeros will be added to make up the field width,
709b50d902SRodney W. Grimesand if it begins with a `\-', the fragment will be left-adjusted
719b50d902SRodney W. Grimeswithin the field.
72*07372194SAllan JudeUsing
73*07372194SAllan Jude.Fl f
74*07372194SAllan Judeapplies only to the next file while
75*07372194SAllan Jude.Fl F
76*07372194SAllan Judeapplies to all subsequent files until it appears again uncapitalized.
77*07372194SAllan Jude.It Fl p Ar min . Ns Ar max , Fl P Ar min . Ns Ar max
78df899658SPhilippe CharnierLike
79df899658SPhilippe Charnier.Fl f ,
809b50d902SRodney W. Grimesbut pad this file's field when end-of-file is reached
819b50d902SRodney W. Grimesand other files are still active.
82*07372194SAllan JudeUsing
83*07372194SAllan Jude.Fl p
84*07372194SAllan Judeapplies only to the next file while
85*07372194SAllan Jude.Fl P
86*07372194SAllan Judeapplies to all subsequent files until it appears again uncapitalized.
87*07372194SAllan Jude.It Fl s Ar sepstring , Fl S Ar sepstring
889b50d902SRodney W. GrimesPrint
89df899658SPhilippe Charnier.Ar sepstring
909b50d902SRodney W. Grimesbefore printing line fragments from the next file.
919b50d902SRodney W. GrimesThis option may appear after the last file.
92*07372194SAllan JudeUsing
93*07372194SAllan Jude.Fl s
94*07372194SAllan Judeapplies only to the next file while
95*07372194SAllan Jude.Fl S
96*07372194SAllan Judeapplies to all subsequent files until it appears again uncapitalized.
97*07372194SAllan Jude.It Fl t Ar c , Fl T Ar c
989b50d902SRodney W. GrimesThe input line terminator is
99df899658SPhilippe Charnier.Ar c
1009b50d902SRodney W. Grimesinstead of a newline.
1019b50d902SRodney W. GrimesThe newline normally appended to each output line is omitted.
102*07372194SAllan JudeUsing
103*07372194SAllan Jude.Fl t
104*07372194SAllan Judeapplies only to the next file while
105*07372194SAllan Jude.Fl T
106*07372194SAllan Judeapplies to all subsequent files until it appears again uncapitalized.
107df899658SPhilippe Charnier.El
108df899658SPhilippe Charnier.Pp
1099b50d902SRodney W. GrimesTo print files simultaneously for easy viewing use
110df899658SPhilippe Charnier.Xr pr 1 .
111df899658SPhilippe Charnier.Sh EXAMPLES
1129b50d902SRodney W. GrimesThe command
113df899658SPhilippe Charnier.Bd -literal
1149b50d902SRodney W. Grimeslam file1 file2 file3 file4
115df899658SPhilippe Charnier.Ed
1169b88faecSRuslan Ermilov.Pp
1179b50d902SRodney W. Grimesjoins 4 files together along each line.
1189b50d902SRodney W. GrimesTo merge the lines from four different files use
119df899658SPhilippe Charnier.Bd -literal
1209b50d902SRodney W. Grimeslam file1 \-S "\\
1219b50d902SRodney W. Grimes" file2 file3 file4
122df899658SPhilippe Charnier.Ed
1239b88faecSRuslan Ermilov.Pp
1249b50d902SRodney W. GrimesEvery 2 lines of a file may be joined on one line with
125df899658SPhilippe Charnier.Bd -literal
1269b50d902SRodney W. Grimeslam \- \- < file
127df899658SPhilippe Charnier.Ed
1289b88faecSRuslan Ermilov.Pp
1299b50d902SRodney W. Grimesand a form letter with substitutions keyed by `@' can be done with
130df899658SPhilippe Charnier.Bd -literal
1319b50d902SRodney W. Grimeslam \-t @ letter changes
132df899658SPhilippe Charnier.Ed
133df899658SPhilippe Charnier.Sh SEE ALSO
134df899658SPhilippe Charnier.Xr join 1 ,
135748dcfb0SGarrett Wollman.Xr paste 1 ,
136df899658SPhilippe Charnier.Xr pr 1 ,
137df899658SPhilippe Charnier.Xr printf 3
138748dcfb0SGarrett Wollman.Sh STANDARDS
139748dcfb0SGarrett WollmanSome of the functionality of
140748dcfb0SGarrett Wollman.Nm
141748dcfb0SGarrett Wollmanis standardized as the
142748dcfb0SGarrett Wollman.Xr paste 1
143748dcfb0SGarrett Wollmanutility by
144748dcfb0SGarrett Wollman.St -p1003.2 .
14504f064d6SColin Percival.Sh HISTORY
14604f064d6SColin PercivalThe
14704f064d6SColin Percival.Nm
14804f064d6SColin Percivalutility first appeared in
14904f064d6SColin Percival.Bx 4.2 .
15021223660SAllan Jude.Sh AUTHORS
15121223660SAllan Jude.An John A. Kunze
15251fce6f6STim J. Robbins.Sh BUGS
15351fce6f6STim J. RobbinsThe
15451fce6f6STim J. Robbins.Nm
15551fce6f6STim J. Robbinsutility does not recognize multibyte characters.
156