ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rsplit.1
Revision: 1.8
Committed: Thu Nov 7 23:13:12 2019 UTC (5 years, 7 months ago) by greg
Branch: MAIN
Changes since 1.7: +7 -2 lines
Log Message:
Made it so a space separator matches all white space

File Contents

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