1 | .\" $NetBSD: lam.1,v 1.2 1994/11/14 20:27:40 jtc Exp $ |
---|
2 | .\" |
---|
3 | .\" Copyright (c) 1993 |
---|
4 | .\" The Regents of the University of California. All rights reserved. |
---|
5 | .\" |
---|
6 | .\" Redistribution and use in source and binary forms, with or without |
---|
7 | .\" modification, are permitted provided that the following conditions |
---|
8 | .\" are met: |
---|
9 | .\" 1. Redistributions of source code must retain the above copyright |
---|
10 | .\" notice, this list of conditions and the following disclaimer. |
---|
11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
---|
12 | .\" notice, this list of conditions and the following disclaimer in the |
---|
13 | .\" documentation and/or other materials provided with the distribution. |
---|
14 | .\" 3. All advertising materials mentioning features or use of this software |
---|
15 | .\" must display the following acknowledgement: |
---|
16 | .\" This product includes software developed by the University of |
---|
17 | .\" California, Berkeley and its contributors. |
---|
18 | .\" 4. Neither the name of the University nor the names of its contributors |
---|
19 | .\" may be used to endorse or promote products derived from this software |
---|
20 | .\" without specific prior written permission. |
---|
21 | .\" |
---|
22 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
---|
23 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
24 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
25 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
---|
26 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
27 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
28 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
29 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
30 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
32 | .\" SUCH DAMAGE. |
---|
33 | .\" |
---|
34 | .\" @(#)lam.1 8.1 (Berkeley) 6/6/93 |
---|
35 | .\" |
---|
36 | .TH LAM 1 "June 6, 1993" |
---|
37 | .UC 4 |
---|
38 | .SH NAME |
---|
39 | lam \- laminate files |
---|
40 | .SH SYNOPSIS |
---|
41 | .B lam [ \-[fp] |
---|
42 | min.max |
---|
43 | .B ] [ \-s |
---|
44 | sepstring |
---|
45 | .B ] [ \-t |
---|
46 | c |
---|
47 | .B ] |
---|
48 | file ... |
---|
49 | .SH DESCRIPTION |
---|
50 | .I Lam |
---|
51 | copies the named files side by side onto the standard output. |
---|
52 | The |
---|
53 | .IR n -th |
---|
54 | input lines from the input |
---|
55 | .IR file s |
---|
56 | are considered fragments of the single long |
---|
57 | .IR n -th |
---|
58 | output line into which they are assembled. |
---|
59 | The name `\fB\-\fP' means the standard input, and may be repeated. |
---|
60 | .PP |
---|
61 | Normally, each option affects only the |
---|
62 | .I file |
---|
63 | after it. |
---|
64 | If the option letter is capitalized it affects all subsequent files |
---|
65 | until it appears again uncapitalized. |
---|
66 | The options are described below. |
---|
67 | .IP \fB\-f\fP\ min.max |
---|
68 | Print line fragments according to the format string |
---|
69 | .IR min.max , |
---|
70 | where |
---|
71 | .I min |
---|
72 | is the minimum field width and |
---|
73 | .I max |
---|
74 | the maximum field width. |
---|
75 | If |
---|
76 | .I min |
---|
77 | begins with a zero, zeros will be added to make up the field width, |
---|
78 | and if it begins with a `\-', the fragment will be left-adjusted |
---|
79 | within the field. |
---|
80 | .IP \fB\-p\fP\ min.max |
---|
81 | Like \fB\-f\fP, |
---|
82 | but pad this file's field when end-of-file is reached |
---|
83 | and other files are still active. |
---|
84 | .IP \fB\-s\fP\ sepstring |
---|
85 | Print |
---|
86 | .I sepstring |
---|
87 | before printing line fragments from the next file. |
---|
88 | This option may appear after the last file. |
---|
89 | .IP \fB\-t\fP\ c |
---|
90 | The input line terminator is |
---|
91 | .I c |
---|
92 | instead of a newline. |
---|
93 | The newline normally appended to each output line is omitted. |
---|
94 | .PP |
---|
95 | To print files simultaneously for easy viewing use |
---|
96 | .IR pr (1). |
---|
97 | .SH EXAMPLES |
---|
98 | .de IC |
---|
99 | .IP |
---|
100 | .ss 36 |
---|
101 | .ft B |
---|
102 | .. |
---|
103 | .de NC |
---|
104 | .br |
---|
105 | .ss 12 |
---|
106 | .PP |
---|
107 | .. |
---|
108 | .PP |
---|
109 | The command |
---|
110 | .IC |
---|
111 | lam file1 file2 file3 file4 |
---|
112 | .NC |
---|
113 | joins 4 files together along each line. |
---|
114 | To merge the lines from four different files use |
---|
115 | .IC |
---|
116 | lam file1 \-S "\\ |
---|
117 | .br |
---|
118 | " file2 file3 file4 |
---|
119 | .NC |
---|
120 | Every 2 lines of a file may be joined on one line with |
---|
121 | .IC |
---|
122 | lam \- \- < file |
---|
123 | .NC |
---|
124 | and a form letter with substitutions keyed by `@' can be done with |
---|
125 | .IC |
---|
126 | lam \-t @ letter changes |
---|
127 | .NC |
---|
128 | .SH SEE ALSO |
---|
129 | join(1), pr(1), printf(3) |
---|