1 |
greg |
1.3 |
.\" RCSid "$Id: rsplit.1,v 1.2 2019/07/05 00:42:56 greg Exp $" |
2 |
greg |
1.1 |
.TH RSPLIT 1 7/8/97 RADIANCE |
3 |
|
|
.SH NAME |
4 |
|
|
rsplit - splits standard input into multiple output files or streams |
5 |
|
|
.SH SYNOPSIS |
6 |
|
|
.B rsplit |
7 |
|
|
[ |
8 |
|
|
.B \-tS |
9 |
|
|
][ |
10 |
|
|
.B \-ih |
11 |
|
|
][ |
12 |
|
|
.B \-iH |
13 |
|
|
][ |
14 |
|
|
.B \-oh |
15 |
|
|
][ |
16 |
|
|
.B \-oH |
17 |
|
|
][ |
18 |
greg |
1.3 |
.B "\-x xres \-y yres" |
19 |
|
|
][ |
20 |
greg |
1.1 |
.B \-oaN |
21 |
|
|
| |
22 |
|
|
.B \-ofN |
23 |
|
|
| |
24 |
|
|
.B \-odN |
25 |
|
|
| |
26 |
|
|
.B \-ocN |
27 |
|
|
| |
28 |
|
|
.B \-oiN |
29 |
|
|
| |
30 |
|
|
.B \-owN |
31 |
|
|
| |
32 |
|
|
.B \-obN |
33 |
|
|
][ |
34 |
|
|
.B \-f |
35 |
|
|
][ |
36 |
|
|
.B \-a |
37 |
|
|
][ |
38 |
|
|
.B "\-on M" |
39 |
|
|
] |
40 |
|
|
output1 [options] output2 .. |
41 |
|
|
.SH DESCRIPTION |
42 |
|
|
.I Rsplit |
43 |
|
|
writes lines or fields from the standard input to one or more output |
44 |
|
|
streams. |
45 |
|
|
By default, fields are separated by a |
46 |
greg |
1.3 |
newline character (i.e., input is distributed by lines), |
47 |
|
|
but the terminator can be changed using the |
48 |
greg |
1.1 |
.I \-t |
49 |
|
|
option. |
50 |
greg |
1.3 |
Different terminators may be given for different fields by specifying |
51 |
greg |
1.1 |
additional |
52 |
|
|
.I \-t |
53 |
greg |
1.3 |
options between each output specification. |
54 |
greg |
1.1 |
Note that there is no space between this option and its argument. |
55 |
|
|
.PP |
56 |
|
|
An output is either a file or a command. |
57 |
|
|
If an output file exists, it will not be overwritten unless the |
58 |
|
|
.I \-f |
59 |
|
|
option is given, or it is being appended using the |
60 |
|
|
.I \-a |
61 |
|
|
option. |
62 |
|
|
Commands are given in quotes, and begin with an exclamantion point ('!'). |
63 |
|
|
.PP |
64 |
|
|
The |
65 |
|
|
.I \-oa |
66 |
|
|
option may be used to specify ASCII data (the default), or the |
67 |
|
|
.I \-of |
68 |
|
|
option may be used to indicated binary IEEE 32-bit floats. |
69 |
|
|
Similarly, the |
70 |
|
|
.I \-od |
71 |
|
|
and |
72 |
|
|
.I \-oi |
73 |
|
|
options may be used to indicate binary 64-bit doubles or integer words, |
74 |
|
|
respectively. |
75 |
|
|
The |
76 |
|
|
.I \-ow |
77 |
|
|
option specifies 2-byte short words, and the |
78 |
|
|
.I \-ob |
79 |
|
|
option specifies bytes. |
80 |
|
|
If a number immediately follows any of these options, then it |
81 |
|
|
indicates that multiple such values are expected for each record. |
82 |
|
|
For example, |
83 |
|
|
.I \-of3 |
84 |
|
|
indicates three floats per output record for the next named output. |
85 |
|
|
In the case of the |
86 |
|
|
.I \-oa |
87 |
|
|
option, no number writes one line or field per stream, and numbers |
88 |
greg |
1.3 |
greater than zero write multiple fields per record to the same stream. |
89 |
|
|
If the terminating character is set to something other than newline ('\\n'), |
90 |
|
|
a newline is added after each record (in addition to the terminator). |
91 |
greg |
1.1 |
For binary output formts, no number implies one value per output. |
92 |
greg |
1.3 |
The terminator is not used for binary output streams. |
93 |
greg |
1.1 |
.PP |
94 |
|
|
These options may be interspersed with output specifications, |
95 |
|
|
indicating different data to draw from the different files. |
96 |
|
|
.PP |
97 |
|
|
If a |
98 |
|
|
.I \-on |
99 |
|
|
option is given with a positive integer argument, this will be the |
100 |
|
|
maximum number of records that will be written by |
101 |
|
|
.I rsplit. |
102 |
|
|
.PP |
103 |
|
|
A hyphen ('-') by itself can be used to indicate the standard |
104 |
|
|
output, and may appear multiple times. |
105 |
|
|
Results will be unpredictable if the standard output is specified |
106 |
|
|
in this way |
107 |
|
|
and any of the command outputs also writes to their standard output. |
108 |
|
|
At most, one command may reliably write to its standard output. |
109 |
|
|
.PP |
110 |
|
|
The |
111 |
|
|
.I \-ih |
112 |
|
|
option tells |
113 |
|
|
.I rsplit |
114 |
|
|
to expect a Radiance header on its input. |
115 |
|
|
The |
116 |
|
|
.I \-iH |
117 |
|
|
option says to expect a resolution string for an image or similar. |
118 |
|
|
The |
119 |
|
|
.I \-x |
120 |
|
|
and |
121 |
|
|
.I \-y |
122 |
|
|
options may alternatively be used to specify the input dimensions. |
123 |
|
|
The |
124 |
|
|
.I \-oh |
125 |
|
|
option tells |
126 |
|
|
.I rsplit |
127 |
|
|
to produce a Radiance header on the next output stream. |
128 |
|
|
The |
129 |
|
|
.I \-oH |
130 |
|
|
option will write a resolution string. |
131 |
|
|
These options toggle the associated mode on and off, |
132 |
|
|
so it is possible to have one output include a header or |
133 |
|
|
resolution string and not the next by specifying the option(s) again. |
134 |
|
|
Neither |
135 |
|
|
.I \-oh |
136 |
|
|
nor |
137 |
|
|
.I \-oH |
138 |
|
|
may be used with the append mode ('-a'). |
139 |
|
|
.SH EXAMPLE |
140 |
|
|
To alternate 5 lines between two output files: |
141 |
|
|
.IP "" .2i |
142 |
greg |
1.2 |
rsplit -oa5 output1.txt output2.txt < input.txt |
143 |
greg |
1.1 |
.PP |
144 |
|
|
To send the first of each double precision triplet to one file, and the second |
145 |
|
|
and third to a second file, stopping after 500 triplets: |
146 |
|
|
.IP "" .2i |
147 |
greg |
1.2 |
rsplit -on 500 -od firstvals.dbl -od2 followingpairs.dbl < triplets.dbl |
148 |
greg |
1.1 |
.PP |
149 |
|
|
To convey material, color and distance information from rtrace to |
150 |
|
|
separate files: |
151 |
|
|
.IP "" .2i |
152 |
|
|
vwrays [viewspec] | rtrace [options] -x 1024 -y 768 -h+ -oMlv octree | rsplit -ih -iH -t^I mats.txt -of depth.zbf -oh -oH -of3 '!pvalue -r -df > image.hdr' |
153 |
|
|
.SH AUTHOR |
154 |
|
|
Greg Ward |
155 |
|
|
.SH "SEE ALSO" |
156 |
|
|
cnt(1), histo(1), neaten(1), rcalc(1), rlam(1), rtrace(1), |
157 |
|
|
split(1), tabfunc(1), total(1) |