7 |
|
[ |
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 records (or lines) from multiple inputs, separating them with |
28 |
< |
the given separator string (TAB by default). |
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 |
48 |
|
Similarly, the |
49 |
|
.I \-id |
50 |
|
and |
51 |
< |
.I \-iw |
51 |
> |
.I \-ii |
52 |
|
options may be used to indicate binary 64-bit doubles or integer words, |
53 |
|
respectively. |
54 |
< |
If an number is immediately follows any of these options, then it |
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 |
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, 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 -t file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl |
88 |
> |
rlam \-id3 file1.dbl file2.dbl file3.dbl file4.dbl > combined.dbl |
89 |
|
.SH AUTHOR |
90 |
|
Greg Ward |
91 |
|
.SH "SEE ALSO" |