ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rsplit.1
Revision: 1.9
Committed: Sat Apr 4 16:23:00 2020 UTC (5 years, 2 months ago) by greg
Branch: MAIN
Changes since 1.8: +4 -1 lines
Log Message:
Added '.' for discarding output

File Contents

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