>_ IzzyLab

Topic breakdown

Besides deletion and substitution, sed has a command to add text after the current line. Like other commands, it can be restricted with a pattern address so the insertion happens only after matched lines. It's important to remember that square brackets in a regex are special characters (a character class), so if they appear in the text you're searching for, they're escaped with a backslash.

What's checked

  1. the line enabled=yes is inserted after [server]

What it looks like