source: tags/1.1/disparm.1

Last change on this file was 5, checked in by willem, 11 years ago

willem

File size: 3.9 KB
Line 
1.TH DISPARM 1
2.SH NAME
3disparm \- alias using disparmcmd to call the program disparmcmd
4.SH SYNOPSIS
5.B disparm
6\fB\ -h,--help  \fP 
7.P 8
8.B disparm
9\fB\ -c,--create  \fP [\fB OPTIONS\fP ] [\fB -i,--input INPUTFILE \fB]
10.P 8
11.B disparm
12\fB\ -n,--next  \fP [\fB OPTIONS\fP ] [\fB -m,--max MAX \fB]
13.P 8
14.B disparm
15\fB\ -r,--ready  \fP [\fB OPTIONS\fP] [\fB -k, --key KEY \fP ]
16.P 8
17.B disparm
18\fB\ -R,--REMOVE  \fP [\fB OPTIONS\fP] [\fB -p, --pool POOL \fP ]
19.P 8
20.B disparm
21\fB\ -s,--stats [\fB -p, --pool POOL \fP ]
22.P 8
23.B disparm
24\fB\ -u,--unhandled [\fB -p, --pool POOL \fP ]
25.P 8
26.B disparm
27\fB\ -v,--version
28.P 8
29.B disparm
30\fB\ -D,--debug [\fB -p, --pool POOL \fP ]
31.SH DESCRIPTION
32disparm is an alias using disparmcmd, an utility to distribute
33strings (parameters) in a pool, in an orderly way.
34In general, the
35strings are used as command parameters, see Examples.
36.SH COMMANDS
37.TP 4
38.B -h,--help
39Prints usage information.
40.TP 4
41.B -c,--create [ -i,--input INPUTFILE ] [ -p,--pool POOL ]
42Creates new pool and fills it with lines from INPUTFILE, default
43from stdin. INPUTFILENAME '-' stands for stdin.
44See OPTIONS for a description of POOL.
45The environment
46variable 'DISPARM_RC' is set, see ENVIRONMENT.
47.TP 4
48.B -n,--next [ -m,--max MAX ] [ -p,--pool POOL ]
49Gets the next string.
50The environment variables DISPARM_RC, DISPARM_VALUE, DISPARM_COMMITTED and DISPARM_KEY are set,
51see ENVIRONMENT.
52The same string in the pool will be
53produced MAX times, the default is 1. By setting this to a higher
54value, the same string will be produced more times. This can be useful
55for dealing with crashed jobs.
56See OPTIONS for a description of POOL.
57.TP 4
58.B -r,--ready [ -k,--key KEY ] [-p,--pool POOL ]
59Marks the token with key KEY as ready. If not specified on the commandline, the
60value of environment variable DISPARM_KEY is used.
61See OPTIONS for a description of POOL.
62.TP 4
63.B -R,--REMOVE --p,--pool POOL ]
64Removes the pool.
65See OPTIONS for a description of POOL.
66.TP 4
67.B -s,--stats
68Prints to standard error:
69
70.br
71total number of strings in pool
72.br
73number of strings delivered
74.br
75number of strings marked as ready
76.br
77maximum one string has been delivered
78.TP 4
79.B -u,--unhandled
80Prints to standard error the strings that are committed, but not marked
81as ready.
82.TP 4
83.B -v,--version
84Prints to standard error the version number of disparm.
85.TP 4
86.B -D,--debug
87Prints to standard error some debug information.
88.SH OPTIONS
89All options accept the following general parameters:
90.TP 4
91.B -p,--pool POOL
92POOL is a unique name of the file that contains the pool.
93Default: pool.disparm in the current directory.
94.TP 4
95.B -d,--lockdir LOCKDIR
96LOCKDIR is a directory to hold the lockfile (implemented as a hard
97link to the pool file). All lockfiles have different names,
98so it is permitted to use the same directory for all uses of disparm.
99Default: the directory where the pool resides.
100
101.SH ENVIRONMENT
102The following environment variables can be set by disparm:
103.P
104.B DISPARM_RC
105if the value is OK, than no errors were found
106.P
107.B DISPARM_KEY
108contains the keyvalue of the token
109.P
110.B DISPARM_LINENO
111contains the line number of the string in the file from which
112the pool file has been created
113.P
114.B DISPARM_COMMITTED
115contains the number of times the string has been committed before
116.P
117.B DISPARM_VALUE
118contains the token
119.SH EXAMPLES
120.TP 4
121
122Create a pool with the firat 10 lines from the man page of sed:
123
124 man sed | head > parmfile
125 disparm -c -p demo1 -i parmfile
126
127Get a line:
128
129 disparm -n -p demo1
130
131The environment variable DISPARM_VALUE contains now one of the
132first ten lines of the man page of sed.
133
134You can use this in a command like this:
135
136 eval "myparser $DISPARM_VALUE"
137
138The token can be marked as ready by:
139
140 disparm -r -p demo1
141
142Finally, the pool can be completely removed by:
143
144 disparm -R -p demo1
145
146.SH "SEE ALSO"
147sara-get-mem-size(1), sara-get-num-cores(1), disparmcmd(1)
148.SH AUTHORS
149Willem Vermin
150.br
151.SH BUGS
152No bugs known yet.
Note: See TracBrowser for help on using the repository browser.