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