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