{
    "api": "YAML JSON TOON Database",
    "version": "1.0.0",
    "format": "json",
    "dataset": {
        "slug": "sed-reference",
        "title": "Sed Reference",
        "description": "Common sed commands, substitutions, and flags.",
        "category": "Unix Commands",
        "category_slug": "unix-commands",
        "tags": "unix,sed,text-processing,stream-editor",
        "view_count": 0
    },
    "data": [
        {
            "pattern": "Substitute",
            "command": "sed 's/foo/bar/g' file",
            "description": "Replace all occurrences of foo with bar globally."
        },
        {
            "pattern": "In-place edit",
            "command": "sed -i 's/foo/bar/g' file",
            "description": "Edit file in place; use -i.bak for backup."
        },
        {
            "pattern": "Delete lines",
            "command": "sed '3d' file",
            "description": "Delete line 3. Use /pattern/d for pattern match."
        },
        {
            "pattern": "Print lines",
            "command": "sed -n '5,10p' file",
            "description": "Print lines 5 through 10 only."
        },
        {
            "pattern": "Insert/append",
            "command": "sed '3i\\nNew line' file",
            "description": "Insert text before line 3."
        },
        {
            "pattern": "Regex group",
            "command": "sed 's/(\\d+)/[\\1]/g'",
            "description": "Capture digits in parentheses and wrap in brackets."
        },
        {
            "pattern": "Multiple commands",
            "command": "sed -e 's/a/A/g' -e 's/e/E/g'",
            "description": "Apply multiple substitution commands."
        },
        {
            "pattern": "Address range",
            "command": "sed '1,5s/old/new/' file",
            "description": "Substitute only in lines 1 through 5."
        }
    ]
}