ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rsplit.1
Revision: 1.6
Committed: Mon Jul 22 18:01:03 2019 UTC (5 years, 11 months ago) by greg
Branch: MAIN
Changes since 1.5: +4 -3 lines
Log Message:
Made option behavior more consistent

File Contents

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