{
    "content": [
        {
            "type": "text",
            "text": "# DICT (man)\n\n## NAME\n\ndict - DICT Protocol Client\n\n## SYNOPSIS\n\ndict word\ndict [options] [word]\ndict [options] dict://host:port/d:word:database\ndict [options] dict://host:port/m:word:database:strategy\n\n## DESCRIPTION\n\ndict is a client for the Dictionary Server Protocol (DICT), a TCP transaction based query/re‐\nsponse protocol that provides access to dictionary definitions from a set of natural language\ndictionary databases.  Exit status is 0 if operation succeeded, or non-zero otherwise.\nSee EXIT STATUS section.\n\n## TLDR\n\n> Dictionary that uses the DICT protocol.\n\n- List available databases:\n  `dict {{-D|--dbs}}`\n- Get information about a database:\n  `dict {{-i|--info}} {{database_name}}`\n- Look up a word in a specific database:\n  `dict {{-d|--database}} {{database_name}} {{word}}`\n- Look up a word in all available databases:\n  `dict {{word}}`\n- Show information about the DICT server:\n  `dict {{-I|--serverinfo}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (24 subsections)\n- **CONFIGURATION**\n- **EXIT STATUS**\n- **CREDITS**\n- **BUGS**\n- **FILES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DICT",
        "section": "",
        "mode": "man",
        "summary": "dict - DICT Protocol Client",
        "synopsis": "dict word\ndict [options] [word]\ndict [options] dict://host:port/d:word:database\ndict [options] dict://host:port/m:word:database:strategy",
        "tldr_summary": "Dictionary that uses the DICT protocol.",
        "tldr_examples": [
            {
                "description": "List available databases",
                "command": "dict {{-D|--dbs}}"
            },
            {
                "description": "Get information about a database",
                "command": "dict {{-i|--info}} {{database_name}}"
            },
            {
                "description": "Look up a word in a specific database",
                "command": "dict {{-d|--database}} {{database_name}} {{word}}"
            },
            {
                "description": "Look up a word in all available databases",
                "command": "dict {{word}}"
            },
            {
                "description": "Show information about the DICT server",
                "command": "dict {{-I|--serverinfo}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-h",
                "long": "--host",
                "arg": null,
                "description": "Specifies the hostname for the DICT server. Server/port combinations can be specified in the configuration file. If no servers are specified in the configuration file or on the command line, dict will fail. If IP lookup for a server expands to a list of IP addresses (as dict.org does currently), then each IP will be tried in the order listed."
            },
            {
                "flag": "-p",
                "long": "--port",
                "arg": null,
                "description": "Specifies the port (e.g., 2628) or service (e.g., dict) for connections. The default is 2628, as specified in the DICT Protocol RFC. Server/port combinations can be spec‐ ified in the configuration file."
            },
            {
                "flag": "-d",
                "long": "--database",
                "arg": null,
                "description": "Specifies a specific database to search. The default is to search all databases (a \"*\" from the DICT protocol). Note that a \"!\" in the DICT protocol means to search all of the databases until a match is found, and then stop searching."
            },
            {
                "flag": "-m",
                "long": "--match",
                "arg": null,
                "description": "Instead of printing a definition, perform a match using the specified strategy."
            },
            {
                "flag": "-s",
                "long": "--strategy",
                "arg": null,
                "description": "Specify a matching strategy. By default, the server default match strategy is used. This is usually \"exact\" for definitions, and some form of spelling-correction strategy for matches (\".\" from the DICT protocol). The available strategies are dependent on the server implementation. For a list of available strategies, see the -S or --strats option."
            },
            {
                "flag": "-C",
                "long": "--nocorrect",
                "arg": null,
                "description": "Usually, if a definition is requested and the word cannot be found, spelling correc‐ tion is requested from the server, and a list of possible words are provided. This option disables the generation of this list."
            },
            {
                "flag": "-c",
                "long": "--config",
                "arg": null,
                "description": "Specify the configuration file. The default is to try ~/.dictrc and /etc/dictd/dict.conf, using the first file that exists. If a specific configuration file is specified, then the defaults will not be tried."
            },
            {
                "flag": "-D",
                "long": "--dbs",
                "arg": null,
                "description": "Query the server and display a list of available databases."
            },
            {
                "flag": "-S",
                "long": "--strats",
                "arg": null,
                "description": "Query the server and display a list of available search strategies."
            },
            {
                "flag": "-H",
                "long": "--serverhelp",
                "arg": null,
                "description": "Query the server and display the help information that it provides."
            },
            {
                "flag": "-i",
                "long": "--info",
                "arg": null,
                "description": "Request information on the specified database (usually the server will provide origi‐ nation, descriptive, or other information about the database or its contents)."
            },
            {
                "flag": "-I",
                "long": "--serverinfo",
                "arg": null,
                "description": "Query the server and display information about the server."
            },
            {
                "flag": "-M",
                "long": "--mime",
                "arg": null,
                "description": "Send OPTION MIME command to the server. NOTE: Server's capabilities are not checked."
            },
            {
                "flag": "-f",
                "long": "--formatted",
                "arg": null,
                "description": "Enables formatted output, i.e. output convenient for postprocessing by standard UNIX utilities. No, it is not XML ;-) Also error and warning messages like \" No matches...\", \" Invalid strategy...\" etc. are sent to stderr, not to stdout. Format: -I, -i, -H and similar: host<TAB>port <SPC><SPC>line1 <SPC><SPC>line2 ... -S: host<TAB>port<TAB>strategy1<TAB>short description1 host<TAB>port<TAB>strategy2<TAB>short description2 ... -D: host<TAB>port<TAB>database1<TAB>database description1 host<TAB>port<TAB>database2<TAB>database description2 ... -m: host<TAB>port<TAB>database1<TAB>match1 host<TAB>port<TAB>database2<TAB>match2 ..."
            },
            {
                "flag": "-a",
                "long": "--noauth",
                "arg": null,
                "description": "Disable authentication (i.e., don't send an AUTH command)."
            },
            {
                "flag": "-u",
                "long": "--user",
                "arg": null,
                "description": "Specifies the username for authentication."
            },
            {
                "flag": "-k",
                "long": "--key",
                "arg": null,
                "description": "Specifies the shared secret for authentication."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Display version information."
            },
            {
                "flag": "-L",
                "long": "--license",
                "arg": null,
                "description": "Display copyright and license information."
            },
            {
                "flag": "-4",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-6",
                "long": null,
                "arg": null,
                "description": "--help Display help information."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Be verbose."
            },
            {
                "flag": "-r",
                "long": "--raw",
                "arg": null,
                "description": "Be very verbose: show the raw client/server interaction."
            },
            {
                "flag": "",
                "long": "--pipesize",
                "arg": null,
                "description": "Specify the buffer size for pipelineing commands. The default is 256, which should be sufficient for general tasks and be below the MTU for most transport media. Larger values may provide faster or slower throughput, depending on MTU. If the buffer is too small, requests will be serialized. Values less than 0 and greater than one mil‐ lion are silently changed to something more reasonable. --client text Specifies additional text to be sent using the CLIENT command. --debug flag Set a debugging flag. Valid flags are: verbose The same as -v or --verbose. raw The same as -r or --raw. scan Debug the scanner for the configuration file. parse Debug the parser for the configuration file. pipe Debug TCP pipelining support (see the DICT RFC and RFC1854). serial Disable pipelining support. time Perform transaction timing."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "dictd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/dictd/8/json"
            },
            {
                "name": "dictzip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/dictzip/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h --host",
                        "lines": 6,
                        "flag": "-h",
                        "long": "--host"
                    },
                    {
                        "name": "-p --port",
                        "lines": 4,
                        "flag": "-p",
                        "long": "--port"
                    },
                    {
                        "name": "-d --database",
                        "lines": 4,
                        "flag": "-d",
                        "long": "--database"
                    },
                    {
                        "name": "-m --match",
                        "lines": 2,
                        "flag": "-m",
                        "long": "--match"
                    },
                    {
                        "name": "-s --strategy",
                        "lines": 6,
                        "flag": "-s",
                        "long": "--strategy"
                    },
                    {
                        "name": "-C --nocorrect",
                        "lines": 4,
                        "flag": "-C",
                        "long": "--nocorrect"
                    },
                    {
                        "name": "-c --config",
                        "lines": 4,
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-D --dbs",
                        "lines": 2,
                        "flag": "-D",
                        "long": "--dbs"
                    },
                    {
                        "name": "-S --strats",
                        "lines": 2,
                        "flag": "-S",
                        "long": "--strats"
                    },
                    {
                        "name": "-H --serverhelp",
                        "lines": 2,
                        "flag": "-H",
                        "long": "--serverhelp"
                    },
                    {
                        "name": "-i --info",
                        "lines": 3,
                        "flag": "-i",
                        "long": "--info"
                    },
                    {
                        "name": "-I --serverinfo",
                        "lines": 2,
                        "flag": "-I",
                        "long": "--serverinfo"
                    },
                    {
                        "name": "-M --mime",
                        "lines": 4,
                        "flag": "-M",
                        "long": "--mime"
                    },
                    {
                        "name": "-f --formatted",
                        "lines": 23,
                        "flag": "-f",
                        "long": "--formatted"
                    },
                    {
                        "name": "-a --noauth",
                        "lines": 2,
                        "flag": "-a",
                        "long": "--noauth"
                    },
                    {
                        "name": "-u --user",
                        "lines": 2,
                        "flag": "-u",
                        "long": "--user"
                    },
                    {
                        "name": "-k --key",
                        "lines": 2,
                        "flag": "-k",
                        "long": "--key"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-L --license",
                        "lines": 2,
                        "flag": "-L",
                        "long": "--license"
                    },
                    {
                        "name": "-4",
                        "lines": 1,
                        "flag": "-4"
                    },
                    {
                        "name": "-6",
                        "lines": 2,
                        "flag": "-6"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-r --raw",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "--pipesize",
                        "lines": 27,
                        "long": "--pipesize"
                    }
                ]
            },
            {
                "name": "CONFIGURATION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "EXIT STATUS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "CREDITS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "dict - DICT Protocol Client\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "dict word\ndict [options] [word]\ndict [options] dict://host:port/d:word:database\ndict [options] dict://host:port/m:word:database:strategy\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "dict is a client for the Dictionary Server Protocol (DICT), a TCP transaction based query/re‐\nsponse protocol that provides access to dictionary definitions from a set of natural language\ndictionary databases.  Exit status is 0 if operation succeeded, or non-zero otherwise.\nSee EXIT STATUS section.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-h --host",
                        "content": "Specifies the hostname for the DICT server.  Server/port combinations can be specified\nin the configuration file.  If no servers are specified in the configuration  file  or\non  the  command line, dict will fail.  If IP lookup for a server expands to a list of\nIP addresses (as dict.org does currently), then each IP will be  tried  in  the  order\nlisted.\n",
                        "flag": "-h",
                        "long": "--host"
                    },
                    {
                        "name": "-p --port",
                        "content": "Specifies  the port (e.g., 2628) or service (e.g., dict) for connections.  The default\nis 2628, as specified in the DICT Protocol RFC.  Server/port combinations can be spec‐\nified in the configuration file.\n",
                        "flag": "-p",
                        "long": "--port"
                    },
                    {
                        "name": "-d --database",
                        "content": "Specifies  a  specific  database to search.  The default is to search all databases (a\n\"*\" from the DICT protocol).  Note that a \"!\" in the DICT protocol means to search all\nof the databases until a match is found, and then stop searching.\n",
                        "flag": "-d",
                        "long": "--database"
                    },
                    {
                        "name": "-m --match",
                        "content": "Instead of printing a definition, perform a match using the specified strategy.\n",
                        "flag": "-m",
                        "long": "--match"
                    },
                    {
                        "name": "-s --strategy",
                        "content": "Specify  a  matching strategy.  By default, the server default match strategy is used.\nThis is usually \"exact\" for definitions, and some form of spelling-correction strategy\nfor  matches  (\".\" from the DICT protocol).  The available strategies are dependent on\nthe server implementation.  For a list of available strategies, see the -S or --strats\noption.\n",
                        "flag": "-s",
                        "long": "--strategy"
                    },
                    {
                        "name": "-C --nocorrect",
                        "content": "Usually,  if  a definition is requested and the word cannot be found, spelling correc‐\ntion is requested from the server, and a list of possible words  are  provided.   This\noption disables the generation of this list.\n",
                        "flag": "-C",
                        "long": "--nocorrect"
                    },
                    {
                        "name": "-c --config",
                        "content": "Specify   the   configuration   file.    The   default   is   to   try  ~/.dictrc  and\n/etc/dictd/dict.conf, using the first file that exists.  If a  specific  configuration\nfile is specified, then the defaults will not be tried.\n",
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-D --dbs",
                        "content": "Query the server and display a list of available databases.\n",
                        "flag": "-D",
                        "long": "--dbs"
                    },
                    {
                        "name": "-S --strats",
                        "content": "Query the server and display a list of available search strategies.\n",
                        "flag": "-S",
                        "long": "--strats"
                    },
                    {
                        "name": "-H --serverhelp",
                        "content": "Query the server and display the help information that it provides.\n",
                        "flag": "-H",
                        "long": "--serverhelp"
                    },
                    {
                        "name": "-i --info",
                        "content": "Request  information on the specified database (usually the server will provide origi‐\nnation, descriptive, or other information about the database or its contents).\n",
                        "flag": "-i",
                        "long": "--info"
                    },
                    {
                        "name": "-I --serverinfo",
                        "content": "Query the server and display information about the server.\n",
                        "flag": "-I",
                        "long": "--serverinfo"
                    },
                    {
                        "name": "-M --mime",
                        "content": "Send OPTION MIME command to the server.\nNOTE: Server's capabilities are not checked.\n\n",
                        "flag": "-M",
                        "long": "--mime"
                    },
                    {
                        "name": "-f --formatted",
                        "content": "Enables formatted output, i.e. output convenient for postprocessing by  standard  UNIX\nutilities. No, it is not XML ;-) Also error and warning messages like\n\" No matches...\", \" Invalid strategy...\" etc. are sent to stderr, not to stdout.\nFormat:\n-I, -i, -H and similar:\nhost<TAB>port\n<SPC><SPC>line1\n<SPC><SPC>line2\n...\n-S:\nhost<TAB>port<TAB>strategy1<TAB>short description1\nhost<TAB>port<TAB>strategy2<TAB>short description2\n...\n-D:\nhost<TAB>port<TAB>database1<TAB>database description1\nhost<TAB>port<TAB>database2<TAB>database description2\n...\n-m:\nhost<TAB>port<TAB>database1<TAB>match1\nhost<TAB>port<TAB>database2<TAB>match2\n...\n\n",
                        "flag": "-f",
                        "long": "--formatted"
                    },
                    {
                        "name": "-a --noauth",
                        "content": "Disable authentication (i.e., don't send an AUTH command).\n",
                        "flag": "-a",
                        "long": "--noauth"
                    },
                    {
                        "name": "-u --user",
                        "content": "Specifies the username for authentication.\n",
                        "flag": "-u",
                        "long": "--user"
                    },
                    {
                        "name": "-k --key",
                        "content": "Specifies the shared secret for authentication.\n",
                        "flag": "-k",
                        "long": "--key"
                    },
                    {
                        "name": "-V --version",
                        "content": "Display version information.\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-L --license",
                        "content": "Display copyright and license information.\n",
                        "flag": "-L",
                        "long": "--license"
                    },
                    {
                        "name": "-4",
                        "content": "",
                        "flag": "-4"
                    },
                    {
                        "name": "-6",
                        "content": "--help Display help information.\n",
                        "flag": "-6"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "Be verbose.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "-r --raw",
                        "content": "Be very verbose: show the raw client/server interaction.\n",
                        "flag": "-r",
                        "long": "--raw"
                    },
                    {
                        "name": "--pipesize",
                        "content": "Specify the buffer size for pipelineing commands.  The default is 256, which should be\nsufficient for general tasks and be below the MTU for most  transport  media.   Larger\nvalues  may  provide  faster or slower throughput, depending on MTU.  If the buffer is\ntoo small, requests will be serialized.  Values less than 0 and greater than one  mil‐\nlion are silently changed to something more reasonable.\n\n--client text\nSpecifies additional text to be sent using the CLIENT command.\n\n--debug flag\nSet a debugging flag.  Valid flags are:\n\nverbose\nThe same as -v or --verbose.\n\nraw    The same as -r or --raw.\n\nscan   Debug the scanner for the configuration file.\n\nparse  Debug the parser for the configuration file.\n\npipe   Debug TCP pipelining support (see the DICT RFC and RFC1854).\n\nserial Disable pipelining support.\n\ntime   Perform transaction timing.\n",
                        "long": "--pipesize"
                    }
                ]
            },
            "CONFIGURATION": {
                "content": "The  configuration  file  currently  has  a  very  simple  format.  Lines are used to specify\nservers, for example:\nserver dict.org\nor, with options:\nserver dict.org { port 8080 }\nserver dict.org { user username secret }\nserver dict.org { port dict user username secret }\nthe port and user options may be specified in any order.  The port option is used to  specify\nan  optional  port  (e.g., 2628) or service (e.g., dict) for the TCP/IP connection.  The user\noption is used to specify a username and shared secret to be used for authentication to  this\nparticular server.\n\nServers are tried in the order listed until a connection is made.\n",
                "subsections": []
            },
            "EXIT STATUS": {
                "content": "0  Successful completion\n\n20 No matches found\n21 Approximate matches found\n22 No databases available\n23 No strategies available\n\n30 Unexpected response code from server\n31 Server is temporarily unavailable\n32 Server is shutting down\n33 Syntax error, command not recognized\n34 Syntax error, illegal parameters\n35 Command not implemented\n36 Command parameter not implemented\n37 Access denied\n38 Authentication failed\n39 Invalid database\n40 Invalid strategy\n41 Connection to server failed\n\n",
                "subsections": []
            },
            "CREDITS": {
                "content": "dict  was  written  by Rik Faith (faith@cs.unc.edu) and is distributed under the terms of the\nGNU General Public License.  If you need to distribute under other terms, write  to  the  au‐\nthor.\n\nThe  main libraries used by this programs (zlib, regex, libmaa) are distributed under differ‐\nent terms, so you may be able to use the libraries for applications  which  are  incompatible\nwith  the  GPL -- please see the copyright notices and license information that come with the\nlibraries for more information, and consult with your attorney to resolve these issues.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "If a dict: URL is given on the command line, only the first one is used.  The  rest  are  ig‐\nnored.\n\nIf a dict: URL contains a specifier for the nth definition or match of a word, it will be ig‐\nnored and all the definitions or matches will be provided.  This violates the RFC,  and  will\nbe corrected in a future release.\n\nIf a dict: URL contains a shared secret, it will not be parsed correctly.\n\nWhen  OPTION  MIME  command is sent to the server (-M option) , server's capabilities are not\nchecked.\n",
                "subsections": []
            },
            "FILES": {
                "content": "~/.dictrc\nUser's dict configuration file\n\n/etc/dictd/dict.conf\nSystem dict configuration file\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "dictd(8), dictzip(1), http://www.dict.org, RFC 2229\n\n\n\n15 February 1998                                   DICT(1)",
                "subsections": []
            }
        }
    }
}