>_ IzzyLab

Topic breakdown

The basic sed operation is substitution s/pattern/replacement/, and its default behavior is exactly what's needed here: without extra flags, only the first match on the line is replaced. sed processes input line by line and by default writes the result to standard output without modifying the original, while lines with no match pass through unchanged.

What's checked

  1. only the first occurrence of cat was replaced

What it looks like