this post was submitted on 25 Nov 2025
296 points (96.8% liked)
Programmer Humor
27507 readers
2163 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Somehow, despite being the standard it doesn't come installed by default in any distro I've tried.
They all insist you use
sed... that bloated thing!ed and sed arre different things. One edits files in place, interactively. The other edits streams i.e.batch processing.
ed is the precursor to vi. Similar commands. It's just you can only work on one line at a time.
You want
sed -i -f -ed is also the precursor of sed, and of some other dozen of commands.
Yes ed begat sed, but sed works differently. It didn't replace ed. It did a different job.
Ed loads the file into a buffer which you edit in a random access fashion and then save. Sed collects a list of commands and then streams the file line by line, executing the commands as they match lines. In your example nothing happens until you've entered the whole editing script.