3 ms·
ed has seen use in scripts -- for example, in Kernighan & Pike's The UNIX Programming Environment. `diff` can output an ed script to perform a patch, and that's
by abecedarius 10y ago
ed has seen use in scripts -- for example, in Kernighan & Pike's The UNIX Programming Environment. `diff` can output an ed script to perform a patch, and that's what people used before `patch` was invented to make patching more robust. I'm surprised you can't rely on ed being present.
- david-given 10y agoI'm working on a codebase right now which uses ed a lot in scripts. I probably wouldn't write new code which used it --- I like awk --- but it actually does the job pretty well. Admittedly, the code does date back to 1984 in places.