{
    "content": [
        {
            "type": "text",
            "text": "# printf (perldoc)\n\n## TLDR\n\n> Format and print text.\n\n- Print a text message:\n  `printf \"{{%s\\n}}\" \"{{Hello world}}\"`\n- Print an integer in bold blue:\n  `printf \"{{\\e[1;34m%.3d\\e[0m\\n}}\" {{42}}`\n- Print a float number with the Unicode Euro sign:\n  `printf \"{{\\u20AC %.2f\\n}}\" {{123.4}}`\n- Print a text message composed with environment variables:\n  `printf \"{{var1: %s\\tvar2: %s\\n}}\" \"{{$VAR1}}\" \"{{$VAR2}}\"`\n- Store a formatted message in a variable (does not work on Zsh):\n  `printf -v {{myvar}} {{\"This is %s = %d\\n\" \"a year\" 2016}}`\n- Print a hexadecimal, octal, and scientific number:\n  `printf \"{{hex=%x octal=%o scientific=%e\\n}}\" 0x{{FF}} 0{{377}} {{100000}}`\n\n*Source: tldr-pages*\n\n---\n\n## Full Content\n\n"
        }
    ],
    "structuredContent": {
        "command": "printf",
        "section": "-f",
        "mode": "perldoc",
        "summary": null,
        "synopsis": null,
        "tldr_summary": "Format and print text.",
        "tldr_examples": [
            {
                "description": "Print a text message",
                "command": "printf \"{{%s\\n}}\" \"{{Hello world}}\""
            },
            {
                "description": "Print an integer in bold blue",
                "command": "printf \"{{\\e[1;34m%.3d\\e[0m\\n}}\" {{42}}"
            },
            {
                "description": "Print a float number with the Unicode Euro sign",
                "command": "printf \"{{\\u20AC %.2f\\n}}\" {{123.4}}"
            },
            {
                "description": "Print a text message composed with environment variables",
                "command": "printf \"{{var1: %s\\tvar2: %s\\n}}\" \"{{$VAR1}}\" \"{{$VAR2}}\""
            },
            {
                "description": "Store a formatted message in a variable (does not work on Zsh)",
                "command": "printf -v {{myvar}} {{\"This is %s = %d\\n\" \"a year\" 2016}}"
            },
            {
                "description": "Print a hexadecimal, octal, and scientific number",
                "command": "printf \"{{hex=%x octal=%o scientific=%e\\n}}\" 0x{{FF}} 0{{377}} {{100000}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [],
        "sections": []
    }
}