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