3 ms·
Pretty much this whole thread is people coming up with better ways of solving the problem. I love Hacker News! :) But I think the point of the blog (for me) is
by janvdberg 8y ago
Pretty much this whole thread is people coming up with better ways of solving the problem. I love Hacker News! :)
But I think the point of the blog (for me) is showing what 'ed' is and where can you use it for (the problem at hand is secondary). And it did exactly that for me, I knew about 'ed' but never really understood what made it special or where/how you could use it. Thanks Julia for enlightening me!
- orivej 8y ago> I knew about 'ed' but never really understood what made it special or where/how you could use it. ed script is one of the formats supported by diff and patch (with their -e or --ed command line switch). (diff generates the script by itself, but patch just pipes it to ed.) ed scripts are used at Apple to maintain their patches for Python: see e.g. https://opensource.apple.com/source/python/python-97.50.7/2.7/fix/posixmodule.c.ed.auto.html https://opensource.apple.com/source/python/python-97.50.7/2.... and others in https://opensource.apple.com/source/python/python-97.50.7/2.7/fix/ https://opensource.apple.com/source/python/python-97.50.7/2....
- captn3m0 8y agofun side note: `patch` runs ed and ed allows you to run arbitary commands resulting in a security issue: https://rachelbythebay.com/w/2018/04/05/bangpatch/ https://rachelbythebay.com/w/2018/04/05/bangpatch/ This was used for the https://holeybeep.ninja/ https://holeybeep.ninja/ April fool joke release.