> 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.)
https://rachelbythebay.com/w/2018/04/05/bangpatch/
This was used for the https://holeybeep.ninja/ April fool joke release.