ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rsplit.1
Revision: 1.7
Committed: Thu Aug 22 21:54:46 2019 UTC (5 years, 8 months ago) by greg
Branch: MAIN
Changes since 1.6: +2 -6 lines
Log Message:
Wording improvements

File Contents

# User Rev Content
1 greg 1.7 .\" RCSid "$Id: rsplit.1,v 1.6 2019/07/22 18:01:03 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.7 No terminator characters are expected or written for binary outputs.
93 greg 1.1 .PP
94     If a
95     .I \-on
96     option is given with a positive integer argument, this will be the
97     maximum number of records that will be written by
98     .I rsplit.
99     .PP
100     A hyphen ('-') by itself can be used to indicate the standard
101     output, and may appear multiple times.
102     Results will be unpredictable if the standard output is specified
103     in this way
104     and any of the command outputs also writes to their standard output.
105     At most, one command may reliably write to its standard output.
106     .PP
107     The
108     .I \-ih
109     option tells
110     .I rsplit
111     to expect a Radiance header on its input.
112     The
113     .I \-iH
114     option says to expect a resolution string for an image or similar.
115     The
116     .I \-x
117     and
118     .I \-y
119     options may alternatively be used to specify the input dimensions.
120     The
121     .I \-oh
122     option tells
123     .I rsplit
124     to produce a Radiance header on the next output stream.
125     The
126     .I \-oH
127     option will write a resolution string.
128     These options toggle the associated mode on and off,
129     so it is possible to have one output include a header or
130     resolution string and not the next by specifying the option(s) again.
131     Neither
132     .I \-oh
133     nor
134     .I \-oH
135 greg 1.6 may be used with the append mode ('-a'), which may also be toggled.
136 greg 1.5 .SH EXAMPLES
137 greg 1.1 To alternate 5 lines between two output files:
138     .IP "" .2i
139 greg 1.2 rsplit -oa5 output1.txt output2.txt < input.txt
140 greg 1.1 .PP
141     To send the first of each double precision triplet to one file, and the second
142     and third to a second file, stopping after 500 triplets:
143     .IP "" .2i
144 greg 1.2 rsplit -on 500 -od firstvals.dbl -od2 followingpairs.dbl < triplets.dbl
145 greg 1.1 .PP
146     To convey material, color and distance information from rtrace to
147     separate files:
148     .IP "" .2i
149     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'
150     .SH AUTHOR
151     Greg Ward
152     .SH "SEE ALSO"
153 greg 1.6 cnt(1), histo(1), neaten(1), rcalc(1), rcode_depth(1),
154     rcode_ident(1), rcode_norm(1), rlam(1), rtrace(1),
155 greg 1.1 split(1), tabfunc(1), total(1)