{
    "content": [
        {
            "type": "text",
            "text": "# tac(1) (man)\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---\n\n**Summary:** tac - concatenate and print files in reverse\n\n**Synopsis:** tac [OPTION]... [FILE]...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -b | --before | — | attach the separator before instead of after |\n| -r | --regex | — | interpret the separator as a regular expression |\n| -s | --separator | — | use STRING as the separator instead of newline --help display this help and exit |\n| — | --version | — | output version information and exit |\n\n## See Also\n\n- rev(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (6 lines) — 4 subsections\n  - -b --before (2 lines)\n  - -r --regex (2 lines)\n  - -s --separator (4 lines)\n  - --version (2 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\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\nWith no FILE, or when FILE is -, read standard input.\n\nMandatory arguments to long options are mandatory for short options too.\n\n#### -b --before\n\nattach the separator before instead of after\n\n#### -r --regex\n\ninterpret the separator as a regular expression\n\n#### -s --separator\n\nuse STRING as the separator instead of newline\n\n--help display this help and exit\n\n#### --version\n\noutput version information and exit\n\n### AUTHOR\n\nWritten by Jay Lepreau and David MacKenzie.\n\n### REPORTING BUGS\n\nGNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n\n### COPYRIGHT\n\nCopyright  ©  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\n### SEE ALSO\n\nrev(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)\n\n"
        }
    ],
    "structuredContent": {
        "command": "tac",
        "section": "1",
        "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": []
            }
        ]
    }
}