Build a sed command for a precise text replacement or line operation.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
A selected sed command combines an address, command letter, and escaped pattern or replacement. The preview shows the shell command without executing it.
Find: foo Replace: bar
Command: sed 's/foo/bar/g' FILENAME Delimiter used: / Flags used: g Flags explained: g replaces every match on each line, not just the first. Notes: Replace FILENAME with the path to your file. On macOS (BSD sed) -i needs an argument, use -i ' ' instead of -i.
Release scripts, Unix pipelines, and migration recipes build sed commands.