1*c382dc7cSdholland.\" $NetBSD: lam.1,v 1.15 2021/01/25 20:07:55 dholland Exp $ 26e0c4dedSjtc.\" 39636069cSjtc.\" Copyright (c) 1993 49636069cSjtc.\" The Regents of the University of California. All rights reserved. 59636069cSjtc.\" 69636069cSjtc.\" Redistribution and use in source and binary forms, with or without 79636069cSjtc.\" modification, are permitted provided that the following conditions 89636069cSjtc.\" are met: 99636069cSjtc.\" 1. Redistributions of source code must retain the above copyright 109636069cSjtc.\" notice, this list of conditions and the following disclaimer. 119636069cSjtc.\" 2. Redistributions in binary form must reproduce the above copyright 129636069cSjtc.\" notice, this list of conditions and the following disclaimer in the 139636069cSjtc.\" documentation and/or other materials provided with the distribution. 1489aaa1bbSagc.\" 3. Neither the name of the University nor the names of its contributors 159636069cSjtc.\" may be used to endorse or promote products derived from this software 169636069cSjtc.\" without specific prior written permission. 179636069cSjtc.\" 189636069cSjtc.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 199636069cSjtc.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 209636069cSjtc.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 219636069cSjtc.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 229636069cSjtc.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 239636069cSjtc.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 249636069cSjtc.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 259636069cSjtc.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 269636069cSjtc.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 279636069cSjtc.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 289636069cSjtc.\" SUCH DAMAGE. 299636069cSjtc.\" 309636069cSjtc.\" @(#)lam.1 8.1 (Berkeley) 6/6/93 319636069cSjtc.\" 32*c382dc7cSdholland.Dd October 26, 2020 334283bd53Swiz.Dt LAM 1 344283bd53Swiz.Os 354283bd53Swiz.Sh NAME 364283bd53Swiz.Nm lam 374283bd53Swiz.Nd laminate files 384283bd53Swiz.Sh SYNOPSIS 394283bd53Swiz.Nm 404283bd53Swiz.Op Fl f Ar min.max 414283bd53Swiz.Op Fl p Ar min.max 424283bd53Swiz.Op Fl s Ar sepstring 434283bd53Swiz.Op Fl t Ar c 444283bd53Swiz.Ar file ... 454283bd53Swiz.Sh DESCRIPTION 464283bd53Swiz.Nm 479636069cSjtccopies the named files side by side onto the standard output. 489636069cSjtcThe 494283bd53Swiz.Em n Ns -th 509636069cSjtcinput lines from the input 514283bd53Swiz.Ar files 529636069cSjtcare considered fragments of the single long 534283bd53Swiz.Em n Ns -th 549636069cSjtcoutput line into which they are assembled. 554283bd53SwizThe name 564283bd53Swiz.Dq \&- 574283bd53Swizmeans the standard input, and may be repeated. 584283bd53Swiz.Pp 599636069cSjtcNormally, each option affects only the 604283bd53Swiz.Ar file 619636069cSjtcafter it. 629636069cSjtcIf the option letter is capitalized it affects all subsequent files 639636069cSjtcuntil it appears again uncapitalized. 649636069cSjtcThe options are described below. 65595e87e3Sjschauma.Pp 664283bd53Swiz.Bl -tag -width "-s sepstring" -compact 674283bd53Swiz.It Fl f Ar min.max 689636069cSjtcPrint line fragments according to the format string 694283bd53Swiz.Ar min.max , 709636069cSjtcwhere 714283bd53Swiz.Ar min 729636069cSjtcis the minimum field width and 734283bd53Swiz.Ar max 749636069cSjtcthe maximum field width. 759636069cSjtcIf 764283bd53Swiz.Ar min 779636069cSjtcbegins with a zero, zeros will be added to make up the field width, 784283bd53Swizand if it begins with a 794283bd53Swiz.Sq \&- , 804283bd53Swizthe fragment will be left-adjusted 819636069cSjtcwithin the field. 824283bd53Swiz.It Fl p Ar min.max 834283bd53SwizLike 844283bd53Swiz.Fl f , 859636069cSjtcbut pad this file's field when end-of-file is reached 869636069cSjtcand other files are still active. 874283bd53Swiz.It Fl s Ar sepstring 889636069cSjtcPrint 894283bd53Swiz.Ar sepstring 909636069cSjtcbefore printing line fragments from the next file. 919636069cSjtcThis option may appear after the last file. 928cdbe2f0Sdholland(A capitalized version appearing before the last file is not carried 938cdbe2f0Sdhollandover past the last file.) 944283bd53Swiz.It Fl t Ar c 959636069cSjtcThe input line terminator is 964283bd53Swiz.Ar c 979636069cSjtcinstead of a newline. 989636069cSjtcThe newline normally appended to each output line is omitted. 994283bd53Swiz.El 1004283bd53Swiz.Pp 1019636069cSjtcTo print files simultaneously for easy viewing use 1024283bd53Swiz.Xr pr 1 . 1034283bd53Swiz.Sh EXAMPLES 1049636069cSjtcThe command 1054283bd53Swiz.Bd -literal -offset indent 1069636069cSjtclam file1 file2 file3 file4 1074283bd53Swiz.Ed 1084283bd53Swiz.Pp 1099636069cSjtcjoins 4 files together along each line. 1109636069cSjtcTo merge the lines from four different files use 1114283bd53Swiz.Bd -literal -offset indent 112*c382dc7cSdhollandlam file1 \-S $'\en' file2 file3 file4 1134283bd53Swiz.Ed 1144283bd53Swiz.Pp 115*c382dc7cSdholland(The means for inserting a newline may depend on your shell.) 116c1cf0b4dSdholland.Pp 1179636069cSjtcEvery 2 lines of a file may be joined on one line with 1184283bd53Swiz.Bd -literal -offset indent 11901869ca4Swizlam \- \- < file 1204283bd53Swiz.Ed 1214283bd53Swiz.Pp 1224283bd53Swizand a form letter with substitutions keyed by 1234283bd53Swiz.Sq \&@ 1244283bd53Swizcan be done with 1254283bd53Swiz.Bd -literal -offset indent 1269636069cSjtclam \-t @ letter changes 1274283bd53Swiz.Ed 1284283bd53Swiz.Sh SEE ALSO 1294283bd53Swiz.Xr join 1 , 1304283bd53Swiz.Xr pr 1 , 1314283bd53Swiz.Xr printf 3 132ce1283dbSkamil.Sh HISTORY 133ce1283dbSkamilThe 134ce1283dbSkamil.Nm 135ce1283dbSkamilutility first appeared in 136ce1283dbSkamil.Bx 4.2 . 137ce1283dbSkamil.Sh AUTHORS 138ce1283dbSkamil.An John A. Kunze 139