| 1 |
greg |
1.7 |
.\" RCSid "$Id: rlam.1,v 1.6 2010/06/18 01:12:57 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.1 |
]
|
| 24 |
|
|
input1 input2 ..
|
| 25 |
|
|
.SH DESCRIPTION
|
| 26 |
|
|
.I Rlam
|
| 27 |
greg |
1.3 |
simply joins records (or lines) from multiple inputs, separating them with
|
| 28 |
greg |
1.4 |
the given string (TAB by default).
|
| 29 |
greg |
1.2 |
Different separators may be given for different files by specifying
|
| 30 |
|
|
additional
|
| 31 |
|
|
.I \-t
|
| 32 |
|
|
options in between each file name.
|
| 33 |
greg |
1.4 |
Note that there is no space between this option and its argument.
|
| 34 |
greg |
1.3 |
If none of the input files uses an ASCII separator, then no end-of-line
|
| 35 |
|
|
character will be printed, either.
|
| 36 |
|
|
.PP
|
| 37 |
greg |
1.1 |
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 |
greg |
1.3 |
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 |
greg |
1.6 |
.I \-ii
|
| 52 |
greg |
1.3 |
options may be used to indicate binary 64-bit doubles or integer words,
|
| 53 |
|
|
respectively.
|
| 54 |
greg |
1.6 |
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 |
greg |
1.3 |
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 |
greg |
1.4 |
For anything other than EOL-separated input, the default tab separator
|
| 70 |
|
|
is reset to the empty string.
|
| 71 |
greg |
1.3 |
.PP
|
| 72 |
greg |
1.1 |
A hyphen ('-') by itself can be used to indicate the standard
|
| 73 |
greg |
1.3 |
input, and may appear multiple times.
|
| 74 |
greg |
1.7 |
The
|
| 75 |
|
|
.I \-u
|
| 76 |
|
|
option forces output after each record (i.e., one run through inputs).
|
| 77 |
greg |
1.1 |
.SH EXAMPLE
|
| 78 |
|
|
To join files output1 and output2, separated by a comma:
|
| 79 |
|
|
.IP "" .2i
|
| 80 |
greg |
1.5 |
rlam \-t, output1 output2
|
| 81 |
greg |
1.1 |
.PP
|
| 82 |
|
|
To join a file with line numbers (starting at 0) and its reverse:
|
| 83 |
|
|
.IP "" .2i
|
| 84 |
greg |
1.5 |
cnt `wc \-l < lam.c` | rlam \- \-t: lam.c \-t\| '!tail \-r lam.c'
|
| 85 |
greg |
1.3 |
.PP
|
| 86 |
|
|
To join four data files, each having three doubles per record:
|
| 87 |
|
|
.IP "" .2i
|
| 88 |
greg |
1.5 |
rlam \-id3 file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl
|
| 89 |
greg |
1.1 |
.SH AUTHOR
|
| 90 |
|
|
Greg Ward
|
| 91 |
|
|
.SH "SEE ALSO"
|
| 92 |
greg |
1.3 |
cnt(1), histo(1), neaten(1), rcalc(1), tabfunc(1), total(1)
|