[Toybox] A brief argument in favor of implementing ed

Robert Thompson robertt.thompson at gmail.com
Tue Nov 22 06:56:39 PST 2011

Much like more, it can successfully work in truly messed-up environments.
It needs no cursor-control at all to do its basic job.

It's obnoxious to use interactively, true, but can be tiny and easily pays
for itself the first time you have to work blind to modify a file.

It's also more useful than sed for modifying files from scripts. More than
once, I have used it to let a shell script change a config option in a
config file in cases where sed was inappropriate or missing/broken. If
you're a little careful, you can use it to change just the option you care
about without even damaging the surrounding comments. And unlike sed, it
already takes care of the write-out phase without you having to explicitly
sed to a tempfile, rename, handle possible error cases.

If it's not available, it is possible to work around it, but it does really
simplify a lot of things that are likely to be needed in minimal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20111122/27263e7c/attachment-0003.htm>

More information about the Toybox mailing list