1*84d9c625SLionel Sambuc.\" $NetBSD: lam.1,v 1.8 2012/12/13 21:09:34 pgoyette Exp $ 21ac41e3fSThomas Cort.\" 31ac41e3fSThomas Cort.\" Copyright (c) 1993 41ac41e3fSThomas Cort.\" The Regents of the University of California. All rights reserved. 51ac41e3fSThomas Cort.\" 61ac41e3fSThomas Cort.\" Redistribution and use in source and binary forms, with or without 71ac41e3fSThomas Cort.\" modification, are permitted provided that the following conditions 81ac41e3fSThomas Cort.\" are met: 91ac41e3fSThomas Cort.\" 1. Redistributions of source code must retain the above copyright 101ac41e3fSThomas Cort.\" notice, this list of conditions and the following disclaimer. 111ac41e3fSThomas Cort.\" 2. Redistributions in binary form must reproduce the above copyright 121ac41e3fSThomas Cort.\" notice, this list of conditions and the following disclaimer in the 131ac41e3fSThomas Cort.\" documentation and/or other materials provided with the distribution. 141ac41e3fSThomas Cort.\" 3. Neither the name of the University nor the names of its contributors 151ac41e3fSThomas Cort.\" may be used to endorse or promote products derived from this software 161ac41e3fSThomas Cort.\" without specific prior written permission. 171ac41e3fSThomas Cort.\" 181ac41e3fSThomas Cort.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 191ac41e3fSThomas Cort.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 201ac41e3fSThomas Cort.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 211ac41e3fSThomas Cort.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 221ac41e3fSThomas Cort.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 231ac41e3fSThomas Cort.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 241ac41e3fSThomas Cort.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 251ac41e3fSThomas Cort.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 261ac41e3fSThomas Cort.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 271ac41e3fSThomas Cort.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 281ac41e3fSThomas Cort.\" SUCH DAMAGE. 291ac41e3fSThomas Cort.\" 301ac41e3fSThomas Cort.\" @(#)lam.1 8.1 (Berkeley) 6/6/93 311ac41e3fSThomas Cort.\" 321ac41e3fSThomas Cort.Dd December 1, 2001 331ac41e3fSThomas Cort.Dt LAM 1 341ac41e3fSThomas Cort.Os 351ac41e3fSThomas Cort.Sh NAME 361ac41e3fSThomas Cort.Nm lam 371ac41e3fSThomas Cort.Nd laminate files 381ac41e3fSThomas Cort.Sh SYNOPSIS 391ac41e3fSThomas Cort.Nm 401ac41e3fSThomas Cort.Op Fl f Ar min.max 411ac41e3fSThomas Cort.Op Fl p Ar min.max 421ac41e3fSThomas Cort.Op Fl s Ar sepstring 431ac41e3fSThomas Cort.Op Fl t Ar c 441ac41e3fSThomas Cort.Ar file ... 451ac41e3fSThomas Cort.Sh DESCRIPTION 461ac41e3fSThomas Cort.Nm 471ac41e3fSThomas Cortcopies the named files side by side onto the standard output. 481ac41e3fSThomas CortThe 491ac41e3fSThomas Cort.Em n Ns -th 501ac41e3fSThomas Cortinput lines from the input 511ac41e3fSThomas Cort.Ar files 521ac41e3fSThomas Cortare considered fragments of the single long 531ac41e3fSThomas Cort.Em n Ns -th 541ac41e3fSThomas Cortoutput line into which they are assembled. 551ac41e3fSThomas CortThe name 561ac41e3fSThomas Cort.Dq \&- 571ac41e3fSThomas Cortmeans the standard input, and may be repeated. 581ac41e3fSThomas Cort.Pp 591ac41e3fSThomas CortNormally, each option affects only the 601ac41e3fSThomas Cort.Ar file 611ac41e3fSThomas Cortafter it. 621ac41e3fSThomas CortIf the option letter is capitalized it affects all subsequent files 631ac41e3fSThomas Cortuntil it appears again uncapitalized. 641ac41e3fSThomas CortThe options are described below. 651ac41e3fSThomas Cort.Pp 661ac41e3fSThomas Cort.Bl -tag -width "-s sepstring" -compact 671ac41e3fSThomas Cort.It Fl f Ar min.max 681ac41e3fSThomas CortPrint line fragments according to the format string 691ac41e3fSThomas Cort.Ar min.max , 701ac41e3fSThomas Cortwhere 711ac41e3fSThomas Cort.Ar min 721ac41e3fSThomas Cortis the minimum field width and 731ac41e3fSThomas Cort.Ar max 741ac41e3fSThomas Cortthe maximum field width. 751ac41e3fSThomas CortIf 761ac41e3fSThomas Cort.Ar min 771ac41e3fSThomas Cortbegins with a zero, zeros will be added to make up the field width, 781ac41e3fSThomas Cortand if it begins with a 791ac41e3fSThomas Cort.Sq \&- , 801ac41e3fSThomas Cortthe fragment will be left-adjusted 811ac41e3fSThomas Cortwithin the field. 821ac41e3fSThomas Cort.It Fl p Ar min.max 831ac41e3fSThomas CortLike 841ac41e3fSThomas Cort.Fl f , 851ac41e3fSThomas Cortbut pad this file's field when end-of-file is reached 861ac41e3fSThomas Cortand other files are still active. 871ac41e3fSThomas Cort.It Fl s Ar sepstring 881ac41e3fSThomas CortPrint 891ac41e3fSThomas Cort.Ar sepstring 901ac41e3fSThomas Cortbefore printing line fragments from the next file. 911ac41e3fSThomas CortThis option may appear after the last file. 921ac41e3fSThomas Cort.It Fl t Ar c 931ac41e3fSThomas CortThe input line terminator is 941ac41e3fSThomas Cort.Ar c 951ac41e3fSThomas Cortinstead of a newline. 961ac41e3fSThomas CortThe newline normally appended to each output line is omitted. 971ac41e3fSThomas Cort.El 981ac41e3fSThomas Cort.Pp 991ac41e3fSThomas CortTo print files simultaneously for easy viewing use 1001ac41e3fSThomas Cort.Xr pr 1 . 1011ac41e3fSThomas Cort.Sh EXAMPLES 1021ac41e3fSThomas CortThe command 1031ac41e3fSThomas Cort.Bd -literal -offset indent 1041ac41e3fSThomas Cortlam file1 file2 file3 file4 1051ac41e3fSThomas Cort.Ed 1061ac41e3fSThomas Cort.Pp 1071ac41e3fSThomas Cortjoins 4 files together along each line. 1081ac41e3fSThomas CortTo merge the lines from four different files use 1091ac41e3fSThomas Cort.Bd -literal -offset indent 110*84d9c625SLionel Sambuclam file1 \-s "\e 1111ac41e3fSThomas Cort" file2 file3 file4 1121ac41e3fSThomas Cort.Ed 1131ac41e3fSThomas Cort.Pp 1141ac41e3fSThomas CortEvery 2 lines of a file may be joined on one line with 1151ac41e3fSThomas Cort.Bd -literal -offset indent 1161ac41e3fSThomas Cortlam \- \- \*[Lt] file 1171ac41e3fSThomas Cort.Ed 1181ac41e3fSThomas Cort.Pp 1191ac41e3fSThomas Cortand a form letter with substitutions keyed by 1201ac41e3fSThomas Cort.Sq \&@ 1211ac41e3fSThomas Cortcan be done with 1221ac41e3fSThomas Cort.Bd -literal -offset indent 1231ac41e3fSThomas Cortlam \-t @ letter changes 1241ac41e3fSThomas Cort.Ed 1251ac41e3fSThomas Cort.Sh SEE ALSO 1261ac41e3fSThomas Cort.Xr join 1 , 1271ac41e3fSThomas Cort.Xr pr 1 , 1281ac41e3fSThomas Cort.Xr printf 3 129