1 |
greg |
1.12 |
.\" RCSid "$Id: rlam.1,v 1.11 2019/07/16 15:59:49 greg Exp $" |
2 |
greg |
1.1 |
.TH RLAM 1 7/8/97 RADIANCE |
3 |
|
|
.SH NAME |
4 |
greg |
1.3 |
rlam - laminate records from multiple files |
5 |
greg |
1.1 |
.SH SYNOPSIS |
6 |
|
|
.B rlam |
7 |
|
|
[ |
8 |
greg |
1.2 |
.B \-tS |
9 |
greg |
1.3 |
][ |
10 |
greg |
1.7 |
.B \-u |
11 |
|
|
][ |
12 |
greg |
1.3 |
.B \-iaN |
13 |
|
|
| |
14 |
|
|
.B \-ifN |
15 |
|
|
| |
16 |
|
|
.B \-idN |
17 |
|
|
| |
18 |
greg |
1.6 |
.B \-iiN |
19 |
|
|
| |
20 |
greg |
1.3 |
.B \-iwN |
21 |
greg |
1.6 |
| |
22 |
|
|
.B \-ibN |
23 |
greg |
1.8 |
][ |
24 |
|
|
.B "\-in M" |
25 |
greg |
1.1 |
] |
26 |
greg |
1.9 |
input1 [options] input2 .. |
27 |
greg |
1.1 |
.SH DESCRIPTION |
28 |
|
|
.I Rlam |
29 |
greg |
1.3 |
simply joins records (or lines) from multiple inputs, separating them with |
30 |
greg |
1.4 |
the given string (TAB by default). |
31 |
greg |
1.2 |
Different separators may be given for different files by specifying |
32 |
|
|
additional |
33 |
|
|
.I \-t |
34 |
|
|
options in between each file name. |
35 |
greg |
1.4 |
Note that there is no space between this option and its argument. |
36 |
greg |
1.11 |
If no argument is given, then a newline is assumed. |
37 |
greg |
1.3 |
If none of the input files uses an ASCII separator, then no end-of-line |
38 |
|
|
character will be printed, either. |
39 |
|
|
.PP |
40 |
greg |
1.10 |
An input is either a file or a command. |
41 |
greg |
1.1 |
Commands are given in quotes, and begin with an exclamantion point ('!'). |
42 |
greg |
1.9 |
If the inputs do not have the same number of records, then |
43 |
greg |
1.1 |
shorter files will stop contributing to the output as they |
44 |
|
|
run out. |
45 |
|
|
.PP |
46 |
greg |
1.3 |
The |
47 |
|
|
.I \-ia |
48 |
|
|
option may be used to specify ASCII input (the default), or the |
49 |
|
|
.I \-if |
50 |
|
|
option may be used to indicated binary IEEE 32-bit floats on input. |
51 |
|
|
Similarly, the |
52 |
|
|
.I \-id |
53 |
|
|
and |
54 |
greg |
1.6 |
.I \-ii |
55 |
greg |
1.3 |
options may be used to indicate binary 64-bit doubles or integer words, |
56 |
|
|
respectively. |
57 |
greg |
1.6 |
The |
58 |
|
|
.I \-iw |
59 |
|
|
option specifies 2-byte short words, and the |
60 |
|
|
.I \-ib |
61 |
|
|
option specifies bytes. |
62 |
greg |
1.10 |
If a number immediately follows any of these options, then it |
63 |
greg |
1.3 |
indicates that multiple such values are expected for each record. |
64 |
|
|
For example, |
65 |
|
|
.I \-if3 |
66 |
|
|
indicates three floats per input record for the next named input. |
67 |
|
|
In the case of the |
68 |
|
|
.I \-ia |
69 |
greg |
1.9 |
option, no number reads one line per record, and numbers |
70 |
|
|
greater than zero take multiple lines at a time from the same stream. |
71 |
greg |
1.3 |
For binary input formts, no number implies one value per record. |
72 |
greg |
1.4 |
For anything other than EOL-separated input, the default tab separator |
73 |
|
|
is reset to the empty string. |
74 |
greg |
1.3 |
.PP |
75 |
greg |
1.9 |
These options may be interspersed with input specifications, |
76 |
|
|
indicating different data to draw from the different files. |
77 |
|
|
.PP |
78 |
greg |
1.8 |
If a |
79 |
|
|
.I \-in |
80 |
|
|
option is given with a positive integer argument, this will be the |
81 |
|
|
maximum number of records that will be read or produced by |
82 |
|
|
.I rlam. |
83 |
|
|
.PP |
84 |
greg |
1.1 |
A hyphen ('-') by itself can be used to indicate the standard |
85 |
greg |
1.3 |
input, and may appear multiple times. |
86 |
greg |
1.7 |
The |
87 |
|
|
.I \-u |
88 |
|
|
option forces output after each record (i.e., one run through inputs). |
89 |
greg |
1.12 |
.SH EXAMPLES |
90 |
greg |
1.1 |
To join files output1 and output2, separated by a comma: |
91 |
|
|
.IP "" .2i |
92 |
greg |
1.5 |
rlam \-t, output1 output2 |
93 |
greg |
1.1 |
.PP |
94 |
|
|
To join a file with line numbers (starting at 0) and its reverse: |
95 |
|
|
.IP "" .2i |
96 |
greg |
1.5 |
cnt `wc \-l < lam.c` | rlam \- \-t: lam.c \-t\| '!tail \-r lam.c' |
97 |
greg |
1.3 |
.PP |
98 |
|
|
To join four data files, each having three doubles per record: |
99 |
|
|
.IP "" .2i |
100 |
greg |
1.5 |
rlam \-id3 file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl |
101 |
greg |
1.9 |
.PP |
102 |
|
|
To join two data files, the first having two words per |
103 |
|
|
record and the second having one: |
104 |
|
|
.IP "" .2i |
105 |
|
|
rlam \-iw2 file1.hi2 \-iw file2.hi1 > combined.hi3 |
106 |
greg |
1.1 |
.SH AUTHOR |
107 |
|
|
Greg Ward |
108 |
|
|
.SH "SEE ALSO" |
109 |
greg |
1.9 |
cnt(1), histo(1), neaten(1), rcalc(1), rsplit(1), tabfunc(1), total(1) |