1DICT(1) DICT(1)
2
3
4
6 dict - DICT Protocol Client
7
9 dict word
10 dict [options] [word]
11 dict [options] dict://host:port/d:word:database
12 dict [options] dict://host:port/m:word:database:strategy
13
15 dict is a client for the Dictionary Server Protocol (DICT), a TCP
16 transaction based query/response protocol that provides access to dic‐
17 tionary definitions from a set of natural language dictionary data‐
18 bases. Exit status is 0 if operation succeeded, or non-zero otherwise.
19 See EXIT STATUS section.
20
21
23 -h server or --host server
24 Specifies the hostname for the DICT server. Server/port combi‐
25 nations can be specified in the configuration file. If no
26 servers are specified in the configuration file or or on the
27 command line, dict will fail. (This is a compile-time option,
28 ./configure --enable-dictorg, which is disabled by default.) If
29 IP lookup for a server expands to a list of IP addresses (as
30 dict.org does currently), then each IP will be tried in the
31 order listed.
32
33 -p service or --port service
34 Specifies the port (e.g., 2628) or service (e.g., dict) for con‐
35 nections. The default is 2628, as specified in the DICT Proto‐
36 col RFC. Server/port combinations can be specified in the con‐
37 figuration file.
38
39 -d dbname or --database dbname
40 Specifies a specific database to search. The default is to
41 search all databases (a "*" from the DICT protocol). Note that
42 a "!" in the DICT protocol means to search all of the databases
43 until a match is found, and then stop searching.
44
45 -m or --match
46 Instead of printing a definition, perform a match using the
47 specified strategy.
48
49 -s strategy or --strategy strategy
50 Specify a matching strategy. By default, the server default
51 match strategy is used. This is usually "exact" for defini‐
52 tions, and some form of spelling-correction strategy for matches
53 ("." from the DICT protocol). The available strategies are
54 dependent on the server implementation. For a list of available
55 strategies, see the -S or --strats option.
56
57 -C or --nocorrect
58 Usually, if a definition is requested and the word cannot be
59 found, spelling correction is requested from the server, and a
60 list of possible words are provided. This option disables the
61 generation of this list.
62
63 -c file or --config file
64 Specify the configuration file. The default is to try ~/.dictrc
65 and /etc/dict.conf, using the first file that exists. If a spe‐
66 cific configuration file is specified, then the defaults will
67 not be tried.
68
69 -D or --dbs
70 Query the server and display a list of available databases.
71
72 -S or --strats
73 Query the server and display a list of available search strate‐
74 gies.
75
76 -H or --serverhelp
77 Query the server and display the help information that it pro‐
78 vides.
79
80 -i dbname or --info dbname
81 Request information on the specified database (usually the
82 server will provide origination, descriptive, or other informa‐
83 tion about the database or its contents).
84
85 -I or --serverinfo
86 Query the server and display information about the server.
87
88 -M or --mime
89 Send OPTION MIME command to the server.
90 NOTE: Server's capabilities are not checked.
91
92
93 -f or --formatted
94 Enables formatted output, i.e. output convenient for postpro‐
95 cessing by standard UNIX utilities. No, it is not XML ;-) Also
96 error and warning messages like
97 " No matches...", " Invalid strategy..." etc. are sent to
98 stderr, not to stdout.
99 Format:
100 -I, -i, -H and similar:
101 host<TAB>port
102 <SPC><SPC>line1
103 <SPC><SPC>line2
104 ...
105 -S:
106 host<TAB>port<TAB>strategy1<TAB>short description1
107 host<TAB>port<TAB>strategy2<TAB>short description2
108 ...
109 -D:
110 host<TAB>port<TAB>database1<TAB>database description1
111 host<TAB>port<TAB>database2<TAB>database description2
112 ...
113 -m:
114 host<TAB>port<TAB>database1<TAB>match1
115 host<TAB>port<TAB>database2<TAB>match2
116 ...
117
118
119 -a or --noauth
120 Disable authentication (i.e., don't send an AUTH command).
121
122 -u user or --user user
123 Specifies the username for authentication.
124
125 -k key or --key key
126 Specifies the shared secret for authentication.
127
128 -V or --version
129 Display version information.
130
131 -L or --license
132 Display copyright and license information.
133
134 --help Display help information.
135
136 -v or --verbose
137 Be verbose.
138
139 -r or --raw
140 Be very verbose: show the raw client/server interaction.
141
142 --pipesize
143 Specify the buffer size for pipelineing commands. The default
144 is 256, which should be sufficient for general tasks and be
145 below the MTU for most transport media. Larger values may pro‐
146 vide faster or slower throughput, depending on MTU. If the buf‐
147 fer is too small, requests will be serialized. Values less than
148 0 and greater than one million are silently changed to something
149 more reasonable.
150
151 --client text
152 Specifies additional text to be sent using the CLIENT command.
153
154 --debug flag
155 Set a debugging flag. Valid flags are:
156
157 verbose
158 The same as -v or --verbose.
159
160 raw The same as -r or --raw.
161
162 scan Debug the scanner for the configuration file.
163
164 parse Debug the parser for the configuration file.
165
166 pipe Debug TCP pipelining support (see the DICT RFC and
167 RFC1854).
168
169 serial Disable pipelining support.
170
171 time Perform transaction timing.
172
174 The configuration file currently has a very simple format. Lines are
175 used to specify servers, for example:
176 server dict.org
177 or, with options:
178 server dict.org { port 8080 }
179 server dict.org { user username secret }
180 server dict.org { port dict user username secret }
181 the port and user options may be specified in any order. The port
182 option is used to specify an optional port (e.g., 2628) or service
183 (e.g., dict) for the TCP/IP connection. The user option is used to
184 specify a username and shared secret to be used for authentication to
185 this particular server.
186
187 Servers are tried in the order listed until a connection is made. If
188 none of the specified servers are available, and the compile-time
189 option (./configure --enable-dictorg) is enabled, then an attempt will
190 be made to connect on localhost and on dict.org at the standard part
191 (2628). (This option is disabled by default.) We expect that dict.org
192 will point to one or more DICT servers (perhaps in round-robin fashion)
193 for the foreseeable future (starting in July 1997), although it is dif‐
194 ficult to predict anything on the Internet for more than about 3-6
195 months.
196
198 0 Successful completion
199
200 20 No matches found
201 21 Approximate matches found
202 22 No databases available
203 23 No strategies available
204
205 30 Unexpected response code from server
206 31 Server is temporarily unavailable
207 32 Server is shutting down
208 33 Syntax error, command not recognized
209 34 Syntax error, illegal parameters
210 35 Command not implemented
211 36 Command parameter not implemented
212 37 Access denied
213 38 Authentication failed
214 39 Invalid database
215 40 Invalid strategy
216 41 Connection to server failed
217
218
220 dict was written by Rik Faith (faith@cs.unc.edu) and is distributed
221 under the terms of the GNU General Public License. If you need to dis‐
222 tribute under other terms, write to the author.
223
224 The main libraries used by this programs (zlib, regex, libmaa) are dis‐
225 tributed under different terms, so you may be able to use the libraries
226 for applications which are incompatible with the GPL -- please see the
227 copyright notices and license information that come with the libraries
228 for more information, and consult with your attorney to resolve these
229 issues.
230
232 If a dict: URL is given on the command line, only the first one is
233 used. The rest are ignored.
234
235 If a dict: URL contains a specifier for the nth definition or match of
236 a word, it will be ignored and all the definitions or matches will be
237 provided. This violates the RFC, and will be corrected in a future
238 release.
239
240 If a dict: URL contains a shared secret, it will not be parsed cor‐
241 rectly.
242
243 When OPTION MIME command is sent to the server (-M option) , server's
244 capabilities are not checked.
245
247 ~/.dictrc
248 User's dict configuration file
249
250 /etc/dict.conf
251 System dict configuration file
252
254 dictd(8), dictzip(1), http://www.dict.org, RFC 2229
255
256
257
258 15 February 1998 DICT(1)