ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/doc/man/man1/rsplit.1
Revision: 1.2
Committed: Fri Jul 5 00:42:56 2019 UTC (5 years, 10 months ago) by greg
Branch: MAIN
Changes since 1.1: +3 -3 lines
Log Message:
Fixes

File Contents

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