Why sed's s/old/new/g Fails With File Paths — Delimiters, Capture Groups, and the GNU vs BSD sed Difference
sed's `s/old/new/g` fails when patterns contain forward slashes (like file paths) — but any character can be the delimiter: `s|/usr/local|/usr/share|g` works identically. Here's the complete sed substitution syntax including & for matched content and \1 capture groups, the -i in-place editing difference between GNU sed (Linux) and BSD sed (macOS), and why grep-first-then-sed is the workflow that prevents data loss.