{
    "content": [
        {
            "type": "text",
            "text": "# RED (man)\n\n## NAME\n\ned - line-oriented text editor\n\n## SYNOPSIS\n\ned [options] [[+line] file]\n\n## DESCRIPTION\n\nGNU  ed  is  a line-oriented text editor. It is used to create, display, modify and otherwise\nmanipulate text files, both interactively and via shell scripts. A restricted version of  ed,\nred,  can  only  edit files in the current directory and cannot execute shell commands. Ed is\nthe 'standard' text editor in the sense that it is the original editor  for  Unix,  and  thus\nwidely available. For most purposes, however, it is superseded by full-screen editors such as\nGNU Emacs or GNU Moe.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (12 subsections)\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "RED",
        "section": "",
        "mode": "man",
        "summary": "ed - line-oriented text editor",
        "synopsis": "ed [options] [[+line] file]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "display this help and exit"
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit"
            },
            {
                "flag": "-E",
                "long": "--extended-regexp",
                "arg": null,
                "description": "use extended regular expressions"
            },
            {
                "flag": "-G",
                "long": "--traditional",
                "arg": null,
                "description": "run in compatibility mode"
            },
            {
                "flag": "-l",
                "long": "--loose-exit-status",
                "arg": null,
                "description": "exit with 0 status even if a command fails"
            },
            {
                "flag": "-p",
                "long": "--prompt",
                "arg": null,
                "description": "use STRING as an interactive prompt"
            },
            {
                "flag": "-q",
                "long": "--silent",
                "arg": null,
                "description": "suppress diagnostics written to stderr"
            },
            {
                "flag": "-r",
                "long": "--restricted",
                "arg": null,
                "description": "run in restricted mode"
            },
            {
                "flag": "-s",
                "long": "--script",
                "arg": null,
                "description": "suppress byte counts and '!' prompt"
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "be verbose; equivalent to the 'H' command"
            },
            {
                "flag": "",
                "long": "--strip-trailing-cr",
                "arg": null,
                "description": "strip carriage returns at end of text lines"
            },
            {
                "flag": "",
                "long": "--unsafe-names",
                "arg": null,
                "description": "allow control characters 1-31 in file names Start edit by reading in 'file' if given. If 'file' begins with a '!', read output of shell command. Exit status: 0 for a normal exit, 1 for environmental problems (invalid command-line options, memory exhausted, command failed, etc), 2 for problems with the input file (file not found, buffer modified, I/O errors), 3 for an internal consistency error (e.g., bug) which caused ed to panic."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-E --extended-regexp",
                        "lines": 2,
                        "flag": "-E",
                        "long": "--extended-regexp"
                    },
                    {
                        "name": "-G --traditional",
                        "lines": 2,
                        "flag": "-G",
                        "long": "--traditional"
                    },
                    {
                        "name": "-l --loose-exit-status",
                        "lines": 2,
                        "flag": "-l",
                        "long": "--loose-exit-status"
                    },
                    {
                        "name": "-p --prompt",
                        "lines": 2,
                        "flag": "-p",
                        "long": "--prompt"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "-r --restricted",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--restricted"
                    },
                    {
                        "name": "-s --script",
                        "lines": 2,
                        "flag": "-s",
                        "long": "--script"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--strip-trailing-cr",
                        "lines": 2,
                        "long": "--strip-trailing-cr"
                    },
                    {
                        "name": "--unsafe-names",
                        "lines": 10,
                        "long": "--unsafe-names"
                    }
                ]
            },
            {
                "name": "REPORTING BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ed - line-oriented text editor\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ed [options] [[+line] file]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "GNU  ed  is  a line-oriented text editor. It is used to create, display, modify and otherwise\nmanipulate text files, both interactively and via shell scripts. A restricted version of  ed,\nred,  can  only  edit files in the current directory and cannot execute shell commands. Ed is\nthe 'standard' text editor in the sense that it is the original editor  for  Unix,  and  thus\nwidely available. For most purposes, however, it is superseded by full-screen editors such as\nGNU Emacs or GNU Moe.\n\nThe  file  name  may be preceded by '+line', '+/RE', or '+?RE' to set the current line to the\nline number specified or to the first or last line matching the regular expression 'RE'.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-h --help",
                        "content": "display this help and exit\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "output version information and exit\n",
                        "flag": "-V",
                        "long": "--version"
                    },
                    {
                        "name": "-E --extended-regexp",
                        "content": "use extended regular expressions\n",
                        "flag": "-E",
                        "long": "--extended-regexp"
                    },
                    {
                        "name": "-G --traditional",
                        "content": "run in compatibility mode\n",
                        "flag": "-G",
                        "long": "--traditional"
                    },
                    {
                        "name": "-l --loose-exit-status",
                        "content": "exit with 0 status even if a command fails\n",
                        "flag": "-l",
                        "long": "--loose-exit-status"
                    },
                    {
                        "name": "-p --prompt",
                        "content": "use STRING as an interactive prompt\n",
                        "flag": "-p",
                        "long": "--prompt"
                    },
                    {
                        "name": "-q --quiet --silent",
                        "content": "suppress diagnostics written to stderr\n",
                        "flag": "-q",
                        "long": "--silent"
                    },
                    {
                        "name": "-r --restricted",
                        "content": "run in restricted mode\n",
                        "flag": "-r",
                        "long": "--restricted"
                    },
                    {
                        "name": "-s --script",
                        "content": "suppress byte counts and '!' prompt\n",
                        "flag": "-s",
                        "long": "--script"
                    },
                    {
                        "name": "-v --verbose",
                        "content": "be verbose; equivalent to the 'H' command\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--strip-trailing-cr",
                        "content": "strip carriage returns at end of text lines\n",
                        "long": "--strip-trailing-cr"
                    },
                    {
                        "name": "--unsafe-names",
                        "content": "allow control characters 1-31 in file names\n\nStart edit by reading in 'file' if given.  If 'file' begins with a '!', read output of  shell\ncommand.\n\nExit status: 0 for a normal exit, 1 for environmental problems (invalid command-line options,\nmemory  exhausted,  command failed, etc), 2 for problems with the input file (file not found,\nbuffer modified, I/O errors), 3 for an internal consistency error (e.g., bug) which caused ed\nto panic.\n",
                        "long": "--unsafe-names"
                    }
                ]
            },
            "REPORTING BUGS": {
                "content": "Report bugs to bug-ed@gnu.org\nEd home page: http://www.gnu.org/software/ed/ed.html\nGeneral help using GNU software: http://www.gnu.org/gethelp\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright © 1994 Andrew L. Moore.\nCopyright  ©  2024  Antonio  Diaz  Diaz.   License  GPLv2+:  GNU  GPL  version  2  or   later\n<http://gnu.org/licenses/gpl.html>\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The full documentation for ed is maintained as a Texinfo manual.  If the info and ed programs\nare properly installed at your site, the command\n\ninfo ed\n\nshould give you access to the complete manual.\n\nGNU ed 1.20.1                               February 2024                                      ED(1)",
                "subsections": []
            }
        }
    }
}