{
    "content": [
        {
            "type": "text",
            "text": "# tac (man)\n\n## NAME\n\ntac - concatenate and print files in reverse\n\n## SYNOPSIS\n\ntac [OPTION]... [FILE]...\n\n## DESCRIPTION\n\nWrite each FILE to standard output, last line first.\n\n## TLDR\n\n> Display and concatenate files with lines in reversed order.\n\n- Concatenate specific files in reversed order:\n  `tac {{path/to/file1 path/to/file2 ...}}`\n- Display `stdin` in reversed order:\n  `{{cat path/to/file}} | tac`\n- Use a specific separator:\n  `tac {{-s|--separator}} {{separator}} {{path/to/file1 path/to/file2 ...}}`\n- Use a specific `regex` as a separator:\n  `tac {{-r|--regex}} {{-s|--separator}} {{separator}} {{path/to/file1 path/to/file2 ...}}`\n- Use a separator before each file:\n  `tac {{-b|--before}} {{path/to/file1 path/to/file2 ...}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (4 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "tac",
        "section": "",
        "mode": "man",
        "summary": "tac - concatenate and print files in reverse",
        "synopsis": "tac [OPTION]... [FILE]...",
        "tldr_summary": "Display and concatenate files with lines in reversed order.",
        "tldr_examples": [
            {
                "description": "Concatenate specific files in reversed order",
                "command": "tac {{path/to/file1 path/to/file2 ...}}"
            },
            {
                "description": "Display `stdin` in reversed order",
                "command": "{{cat path/to/file}} | tac"
            },
            {
                "description": "Use a specific separator",
                "command": "tac {{-s|--separator}} {{separator}} {{path/to/file1 path/to/file2 ...}}"
            },
            {
                "description": "Use a specific `regex` as a separator",
                "command": "tac {{-r|--regex}} {{-s|--separator}} {{separator}} {{path/to/file1 path/to/file2 ...}}"
            },
            {
                "description": "Use a separator before each file",
                "command": "tac {{-b|--before}} {{path/to/file1 path/to/file2 ...}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-b",
                "long": "--before",
                "arg": null,
                "description": "attach the separator before instead of after"
            },
            {
                "flag": "-r",
                "long": "--regex",
                "arg": null,
                "description": "interpret the separator as a regular expression"
            },
            {
                "flag": "-s",
                "long": "--separator",
                "arg": null,
                "description": "use STRING as the separator instead of newline --help display this help and exit"
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "output version information and exit"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "rev",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/rev/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-b --before",
                        "lines": 2,
                        "flag": "-b",
                        "long": "--before"
                    },
                    {
                        "name": "-r --regex",
                        "lines": 2,
                        "flag": "-r",
                        "long": "--regex"
                    },
                    {
                        "name": "-s --separator",
                        "lines": 4,
                        "flag": "-s",
                        "long": "--separator"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "tac - concatenate and print files in reverse\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "tac [OPTION]... [FILE]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Write each FILE to standard output, last line first.\n\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n",
                "subsections": [
                    {
                        "name": "-b --before",
                        "content": "attach the separator before instead of after\n",
                        "flag": "-b",
                        "long": "--before"
                    },
                    {
                        "name": "-r --regex",
                        "content": "interpret the separator as a regular expression\n",
                        "flag": "-r",
                        "long": "--regex"
                    },
                    {
                        "name": "-s --separator",
                        "content": "use STRING as the separator instead of newline\n\n--help display this help and exit\n",
                        "flag": "-s",
                        "long": "--separator"
                    },
                    {
                        "name": "--version",
                        "content": "output version information and exit\n",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Jay Lepreau and David MacKenzie.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or later\n<https://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": "rev(1)\n\nFull documentation <https://www.gnu.org/software/coreutils/tac>\nor available locally via: info '(coreutils) tac invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                      TAC(1)",
                "subsections": []
            }
        }
    }
}