1 |
greg |
1.11 |
.\" RCSid "$Id: rsplit.1,v 1.10 2020/04/05 02:25:22 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.8 |
If a space is specified as the terminator, then fields are separated by |
51 |
|
|
any number of white spaces, including tabs, returns, and newlines. |
52 |
greg |
1.3 |
Different terminators may be given for different fields by specifying |
53 |
greg |
1.1 |
additional |
54 |
|
|
.I \-t |
55 |
greg |
1.3 |
options between each output specification. |
56 |
greg |
1.8 |
Note that there is no space between this option and its argument, and |
57 |
|
|
certain arguments, such as a space or a tab, must be quoted or escaped |
58 |
|
|
with a backslash in most shells. |
59 |
|
|
If no argument is given, the default newline terminator is re-established. |
60 |
greg |
1.1 |
.PP |
61 |
greg |
1.11 |
Output is either to a file, to a command, to the standard output, or to discard. |
62 |
|
|
If a named output file exists, it will not be overwritten unless the |
63 |
greg |
1.1 |
.I \-f |
64 |
|
|
option is given, or it is being appended using the |
65 |
|
|
.I \-a |
66 |
|
|
option. |
67 |
greg |
1.11 |
The same output file may not appear more than once. |
68 |
greg |
1.1 |
Commands are given in quotes, and begin with an exclamantion point ('!'). |
69 |
greg |
1.11 |
At most, one command may reliably write to its standard output, and |
70 |
|
|
doing so is incompatible with |
71 |
|
|
.I rsplit |
72 |
|
|
also writing to standard output. |
73 |
|
|
A hyphen ('-') by itself tells |
74 |
|
|
.I rsplit |
75 |
|
|
to write directly to its standard output, and may appear multiple times. |
76 |
|
|
The options before the first appearance determine the |
77 |
|
|
standard output header parameters. |
78 |
|
|
A period ('.') tells |
79 |
|
|
.I rsplit |
80 |
|
|
to discard the corresponding data, and also may appear multiple times. |
81 |
greg |
1.1 |
.PP |
82 |
|
|
The |
83 |
|
|
.I \-oa |
84 |
|
|
option may be used to specify ASCII data (the default), or the |
85 |
|
|
.I \-of |
86 |
|
|
option may be used to indicated binary IEEE 32-bit floats. |
87 |
|
|
Similarly, the |
88 |
|
|
.I \-od |
89 |
|
|
and |
90 |
|
|
.I \-oi |
91 |
|
|
options may be used to indicate binary 64-bit doubles or integer words, |
92 |
|
|
respectively. |
93 |
|
|
The |
94 |
|
|
.I \-ow |
95 |
|
|
option specifies 2-byte short words, and the |
96 |
|
|
.I \-ob |
97 |
|
|
option specifies bytes. |
98 |
|
|
If a number immediately follows any of these options, then it |
99 |
|
|
indicates that multiple such values are expected for each record. |
100 |
|
|
For example, |
101 |
|
|
.I \-of3 |
102 |
|
|
indicates three floats per output record for the next named output. |
103 |
|
|
In the case of the |
104 |
|
|
.I \-oa |
105 |
|
|
option, no number writes one line or field per stream, and numbers |
106 |
greg |
1.3 |
greater than zero write multiple fields per record to the same stream. |
107 |
|
|
If the terminating character is set to something other than newline ('\\n'), |
108 |
|
|
a newline is added after each record (in addition to the terminator). |
109 |
greg |
1.1 |
For binary output formts, no number implies one value per output. |
110 |
greg |
1.7 |
No terminator characters are expected or written for binary outputs. |
111 |
greg |
1.1 |
.PP |
112 |
|
|
If a |
113 |
|
|
.I \-on |
114 |
|
|
option is given with a positive integer argument, this will be the |
115 |
|
|
maximum number of records that will be written by |
116 |
|
|
.I rsplit. |
117 |
|
|
.PP |
118 |
|
|
The |
119 |
|
|
.I \-ih |
120 |
|
|
option tells |
121 |
|
|
.I rsplit |
122 |
|
|
to expect a Radiance header on its input. |
123 |
|
|
The |
124 |
|
|
.I \-iH |
125 |
|
|
option says to expect a resolution string for an image or similar. |
126 |
|
|
The |
127 |
|
|
.I \-x |
128 |
|
|
and |
129 |
|
|
.I \-y |
130 |
|
|
options may alternatively be used to specify the input dimensions. |
131 |
|
|
The |
132 |
|
|
.I \-oh |
133 |
|
|
option tells |
134 |
|
|
.I rsplit |
135 |
|
|
to produce a Radiance header on the next output stream. |
136 |
|
|
The |
137 |
|
|
.I \-oH |
138 |
|
|
option will write a resolution string. |
139 |
|
|
These options toggle the associated mode on and off, |
140 |
|
|
so it is possible to have one output include a header or |
141 |
|
|
resolution string and not the next by specifying the option(s) again. |
142 |
|
|
Neither |
143 |
|
|
.I \-oh |
144 |
|
|
nor |
145 |
|
|
.I \-oH |
146 |
greg |
1.6 |
may be used with the append mode ('-a'), which may also be toggled. |
147 |
greg |
1.5 |
.SH EXAMPLES |
148 |
greg |
1.1 |
To alternate 5 lines between two output files: |
149 |
|
|
.IP "" .2i |
150 |
greg |
1.2 |
rsplit -oa5 output1.txt output2.txt < input.txt |
151 |
greg |
1.1 |
.PP |
152 |
|
|
To send the first of each double precision triplet to one file, and the second |
153 |
|
|
and third to a second file, stopping after 500 triplets: |
154 |
|
|
.IP "" .2i |
155 |
greg |
1.2 |
rsplit -on 500 -od firstvals.dbl -od2 followingpairs.dbl < triplets.dbl |
156 |
greg |
1.1 |
.PP |
157 |
|
|
To convey material, color and distance information from rtrace to |
158 |
|
|
separate files: |
159 |
|
|
.IP "" .2i |
160 |
|
|
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' |
161 |
|
|
.SH AUTHOR |
162 |
|
|
Greg Ward |
163 |
|
|
.SH "SEE ALSO" |
164 |
greg |
1.6 |
cnt(1), histo(1), neaten(1), rcalc(1), rcode_depth(1), |
165 |
greg |
1.10 |
rcode_ident(1), rcode_norm(1), rcode2bmp(1), |
166 |
|
|
rlam(1), rtpict(1), rtrace(1), split(1), tabfunc(1), total(1) |