{
    "content": [
        {
            "type": "text",
            "text": "# name2addr(1) (man)\n\n**Summary:** addr2name, name2addr - perform DNS lookups from scripts\n\n**Synopsis:** addr2name [-46cmnr] [HOSTNAMES]\nname2addr [-46cn] [HOSTNAMES]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -4 | --ipv4 | — | Only try to perform IPv4 lookups. |\n| -6 | --ipv6 | — | Only try to perform IPv6 lookups. |\n| -c | --config | — | Only lookup and print results for address families that match locally configured ad‐ dresses (If the system has no IPv4  |\n| -h | --help | — | Display some help and exit. |\n| -m | --multiple | — | Normally, if a name yields multiple results, only the first one is printed. With this optional parameter, all results wi |\n| -n | --numeric | — | Prevent forward hostname lookup. This ensures that the input names are numeric ad‐ dresses, which do not need to be look |\n| -r | --reverse | — | Perform a reverse DNS lookup (enabled implicitly with addr2name). addr2name prints numerical resolved addresses by defau |\n| — | --version | — | Display program version and license and exit. |\n\n## See Also\n\n- host(1)\n- getaddrinfo(3)\n- getnameinfo(3)\n- resolv.conf(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (5 lines)\n- **DESCRIPTON** (4 lines)\n- **OPTIONS** (1 lines) — 8 subsections\n  - -4 --ipv4 (3 lines)\n  - -6 --ipv6 (3 lines)\n  - -c --config (5 lines)\n  - -h --help (3 lines)\n  - -m --multiple (4 lines)\n  - -n --numeric (5 lines)\n  - -r --reverse (4 lines)\n  - --version (3 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (7 lines)\n\n## Full Content\n\n### NAME\n\naddr2name, name2addr - perform DNS lookups from scripts\n\n### SYNOPSIS\n\naddr2name [-46cmnr] [HOSTNAMES]\n\nname2addr [-46cn] [HOSTNAMES]\n\n### DESCRIPTON\n\nWrite  addresses or canonical hostname of specified names to the standard output. If no names\nare specified via the command line, they are read from the standard input.\n\n### OPTIONS\n\n#### -4 --ipv4\n\nOnly try to perform IPv4 lookups.\n\n#### -6 --ipv6\n\nOnly try to perform IPv6 lookups.\n\n#### -c --config\n\nOnly lookup and print results for address families that match locally  configured  ad‐\ndresses  (If  the  system has no IPv4 resp IPv6 address, then IPv4 resp IPv6 addresses\nare ignored).\n\n#### -h --help\n\nDisplay some help and exit.\n\n#### -m --multiple\n\nNormally, if a name yields multiple results, only the first one is printed.  With this\noptional parameter, all results will be printed on a single line, separated by spaces.\n\n#### -n --numeric\n\nPrevent  forward  hostname  lookup.  This ensures that the input names are numeric ad‐\ndresses, which do not need to be looked up. Typically used along  with  the  --reverse\noption to convert numerical addresses to canonical hostnames.\n\n#### -r --reverse\n\nPerform  a  reverse  DNS lookup (enabled implicitly with addr2name).  addr2name prints\nnumerical resolved addresses by default instead.\n\n#### --version\n\nDisplay program version and license and exit.\n\n### SEE ALSO\n\nhost(1), getaddrinfo(3), getnameinfo(3), resolv.conf(5)\n\n### AUTHOR\n\nRémi Denis-Courmont <remi at remlab dot net>\n\nhttp://www.remlab.net/ndisc6/\n\n\n\naddr2name                                      $Date$                                   ADDR2NAME(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "name2addr",
        "section": "1",
        "mode": "man",
        "summary": "addr2name, name2addr - perform DNS lookups from scripts",
        "synopsis": "addr2name [-46cmnr] [HOSTNAMES]\nname2addr [-46cn] [HOSTNAMES]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-4",
                "long": "--ipv4",
                "arg": null,
                "description": "Only try to perform IPv4 lookups."
            },
            {
                "flag": "-6",
                "long": "--ipv6",
                "arg": null,
                "description": "Only try to perform IPv6 lookups."
            },
            {
                "flag": "-c",
                "long": "--config",
                "arg": null,
                "description": "Only lookup and print results for address families that match locally configured ad‐ dresses (If the system has no IPv4 resp IPv6 address, then IPv4 resp IPv6 addresses are ignored)."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display some help and exit."
            },
            {
                "flag": "-m",
                "long": "--multiple",
                "arg": null,
                "description": "Normally, if a name yields multiple results, only the first one is printed. With this optional parameter, all results will be printed on a single line, separated by spaces."
            },
            {
                "flag": "-n",
                "long": "--numeric",
                "arg": null,
                "description": "Prevent forward hostname lookup. This ensures that the input names are numeric ad‐ dresses, which do not need to be looked up. Typically used along with the --reverse option to convert numerical addresses to canonical hostnames."
            },
            {
                "flag": "-r",
                "long": "--reverse",
                "arg": null,
                "description": "Perform a reverse DNS lookup (enabled implicitly with addr2name). addr2name prints numerical resolved addresses by default instead."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Display program version and license and exit."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "host",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/host/1/json"
            },
            {
                "name": "getaddrinfo",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/getaddrinfo/3/json"
            },
            {
                "name": "getnameinfo",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/getnameinfo/3/json"
            },
            {
                "name": "resolv.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/resolv.conf/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTON",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-4 --ipv4",
                        "lines": 3,
                        "flag": "-4",
                        "long": "--ipv4"
                    },
                    {
                        "name": "-6 --ipv6",
                        "lines": 3,
                        "flag": "-6",
                        "long": "--ipv6"
                    },
                    {
                        "name": "-c --config",
                        "lines": 5,
                        "flag": "-c",
                        "long": "--config"
                    },
                    {
                        "name": "-h --help",
                        "lines": 3,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-m --multiple",
                        "lines": 4,
                        "flag": "-m",
                        "long": "--multiple"
                    },
                    {
                        "name": "-n --numeric",
                        "lines": 5,
                        "flag": "-n",
                        "long": "--numeric"
                    },
                    {
                        "name": "-r --reverse",
                        "lines": 4,
                        "flag": "-r",
                        "long": "--reverse"
                    },
                    {
                        "name": "--version",
                        "lines": 3,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}